Skip to content

Commit a017a5b

Browse files
committed
Move early needs_subst bailout to _after_ linting.
This ensures we get still get lints for generic contexts.
1 parent 5118048 commit a017a5b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/librustc_mir/transform/const_prop.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -575,11 +575,6 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
575575
return None;
576576
}
577577

578-
// FIXME we need to revisit this for #67176
579-
if rvalue.needs_subst() {
580-
return None;
581-
}
582-
583578
// Perform any special handling for specific Rvalue types.
584579
// Generally, checks here fall into one of two categories:
585580
// 1. Additional checking to provide useful lints to the user
@@ -620,6 +615,11 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
620615
_ => {}
621616
}
622617

618+
// FIXME we need to revisit this for #67176
619+
if rvalue.needs_subst() {
620+
return None;
621+
}
622+
623623
self.use_ecx(|this| {
624624
trace!("calling eval_rvalue_into_place(rvalue = {:?}, place = {:?})", rvalue, place);
625625
this.ecx.eval_rvalue_into_place(rvalue, place)?;

0 commit comments

Comments
 (0)