Skip to content

Commit b1bef90

Browse files
committed
Rename lint pass.
1 parent 7e1ecff commit b1bef90

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

compiler/rustc_mir_transform/src/const_prop_lint.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ use crate::MirLint;
3434
/// Severely regress performance.
3535
const MAX_ALLOC_LIMIT: u64 = 1024;
3636

37-
pub struct ConstProp;
37+
pub struct ConstPropLint;
3838

39-
impl<'tcx> MirLint<'tcx> for ConstProp {
39+
impl<'tcx> MirLint<'tcx> for ConstPropLint {
4040
fn run_lint(&self, tcx: TyCtxt<'tcx>, body: &Body<'tcx>) {
4141
if body.tainted_by_errors.is_some() {
4242
return;
@@ -55,18 +55,18 @@ impl<'tcx> MirLint<'tcx> for ConstProp {
5555
// Only run const prop on functions, methods, closures and associated constants
5656
if !is_fn_like && !is_assoc_const {
5757
// skip anon_const/statics/consts because they'll be evaluated by miri anyway
58-
trace!("ConstProp skipped for {:?}", def_id);
58+
trace!("ConstPropLint skipped for {:?}", def_id);
5959
return;
6060
}
6161

6262
// FIXME(welseywiser) const prop doesn't work on generators because of query cycles
6363
// computing their layout.
6464
if let DefKind::Generator = def_kind {
65-
trace!("ConstProp skipped for generator {:?}", def_id);
65+
trace!("ConstPropLint skipped for generator {:?}", def_id);
6666
return;
6767
}
6868

69-
trace!("ConstProp starting for {:?}", def_id);
69+
trace!("ConstPropLint starting for {:?}", def_id);
7070

7171
// FIXME(oli-obk, eddyb) Optimize locals (or even local paths) to hold
7272
// constants, instead of just checking for const-folding succeeding.
@@ -75,7 +75,7 @@ impl<'tcx> MirLint<'tcx> for ConstProp {
7575
let mut linter = ConstPropagator::new(body, tcx);
7676
linter.visit_body(body);
7777

78-
trace!("ConstProp done for {:?}", def_id);
78+
trace!("ConstPropLint done for {:?}", def_id);
7979
}
8080
}
8181

compiler/rustc_mir_transform/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ fn run_runtime_lowering_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
494494
&elaborate_box_derefs::ElaborateBoxDerefs,
495495
&generator::StateTransform,
496496
&add_retag::AddRetag,
497-
&Lint(const_prop_lint::ConstProp),
497+
&Lint(const_prop_lint::ConstPropLint),
498498
];
499499
pm::run_passes_no_validate(tcx, body, passes, Some(MirPhase::Runtime(RuntimePhase::Initial)));
500500
}

0 commit comments

Comments
 (0)