Skip to content

Commit be0e9c2

Browse files
RalfJungpnkfelix
authored andcommitted
Revert "Move early needs_subst bailout to _after_ linting."
This reverts commit 99492e4.
1 parent 3360cc3 commit be0e9c2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/librustc_mir/transform/const_prop.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,11 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
596596
return None;
597597
}
598598

599+
// FIXME we need to revisit this for #67176
600+
if rvalue.needs_subst() {
601+
return None;
602+
}
603+
599604
// Perform any special handling for specific Rvalue types.
600605
// Generally, checks here fall into one of two categories:
601606
// 1. Additional checking to provide useful lints to the user
@@ -636,11 +641,6 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
636641
_ => {}
637642
}
638643

639-
// FIXME we need to revisit this for #67176
640-
if rvalue.needs_subst() {
641-
return None;
642-
}
643-
644644
self.use_ecx(|this| {
645645
trace!("calling eval_rvalue_into_place(rvalue = {:?}, place = {:?})", rvalue, place);
646646
this.ecx.eval_rvalue_into_place(rvalue, place)?;

0 commit comments

Comments
 (0)