Skip to content

Commit a1841f5

Browse files
authored
Rollup merge of #165822 - TaKO8Ki:remove-unused-compiler-definitions, r=wesleywiser
Remove unused compiler modules and types This pr removes unused types and modules. In detail, #145244 removed the call to `binary_search_slice`. #145951 removed `GenerateProofTree` usages. #123761 removed `PrintClosureAsImpl` diagnostic usage in favor of `suggest_impl_trait`. #125775 subsequently removed the helper that constructed it.
2 parents 8277932 + b0d1b2d commit a1841f5

6 files changed

Lines changed: 1 addition & 71 deletions

File tree

‎compiler/rustc_data_structures/src/binary_search_util/mod.rs‎

Lines changed: 0 additions & 27 deletions
This file was deleted.

‎compiler/rustc_data_structures/src/binary_search_util/tests.rs‎

Lines changed: 0 additions & 23 deletions
This file was deleted.

‎compiler/rustc_data_structures/src/lib.rs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ pub use rustc_index::static_assert_size;
5252
pub use {either, indexmap, smallvec, thin_vec};
5353
pub mod aligned;
5454
pub mod base_n;
55-
pub mod binary_search_util;
5655
pub mod fingerprint;
5756
pub mod flat_map_in_place;
5857
pub mod flock;

‎compiler/rustc_middle/src/ty/print/pretty.rs‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3122,11 +3122,6 @@ impl<'tcx> ty::PolyTraitClause<'tcx> {
31223122
}
31233123
}
31243124

3125-
#[derive(Debug, Copy, Clone, Lift)]
3126-
pub struct PrintClosureAsImpl<'tcx> {
3127-
pub closure: ty::ClosureArgs<TyCtxt<'tcx>>,
3128-
}
3129-
31303125
macro_rules! forward_display_to_print {
31313126
($($ty:ty),+) => {
31323127
$(
@@ -3411,10 +3406,6 @@ define_print_and_forward_display! {
34113406
self.0.trait_ref.print_trait_sugared().print(p)?;
34123407
}
34133408

3414-
PrintClosureAsImpl<'tcx> {
3415-
p.pretty_print_closure_as_impl(self.closure)?;
3416-
}
3417-
34183409
ty::ParamTy {
34193410
write!(p, "{}", self.name)?;
34203411
}

‎compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
use std::mem;
22
use std::ops::ControlFlow;
33

4-
#[cfg(feature = "nightly")]
5-
use rustc_macros::StableHash;
64
use rustc_type_ir::data_structures::HashSet;
75
use rustc_type_ir::inherent::*;
86
use rustc_type_ir::region_constraint::RegionConstraint;
@@ -168,13 +166,6 @@ where
168166
pub(super) inspect: inspect::EvaluationStepBuilder<D>,
169167
}
170168

171-
#[derive(PartialEq, Eq, Debug, Hash, Clone, Copy)]
172-
#[cfg_attr(feature = "nightly", derive(StableHash))]
173-
pub enum GenerateProofTree {
174-
Yes,
175-
No,
176-
}
177-
178169
pub trait SolverDelegateEvalExt: SolverDelegate {
179170
/// Evaluates a goal from **outside** of the trait solver.
180171
///

‎compiler/rustc_next_trait_solver/src/solve/mod.rs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ use thin_vec::{ThinVec, thin_vec};
3030
use tracing::instrument;
3131

3232
pub use self::eval_ctxt::{
33-
EvalCtxt, GenerateProofTree, SolverDelegateEvalExt,
34-
evaluate_root_goal_for_proof_tree_raw_provider, fast_path,
33+
EvalCtxt, SolverDelegateEvalExt, evaluate_root_goal_for_proof_tree_raw_provider, fast_path,
3534
};
3635
use crate::delegate::SolverDelegate;
3736
use crate::solve::assembly::Candidate;

0 commit comments

Comments
 (0)