Skip to content

Commit 99492e4

Browse files
committed
Move early needs_subst bailout to _after_ linting.
This ensures we get still get lints for generic contexts.
1 parent 3e6609e commit 99492e4

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
@@ -578,11 +578,6 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
578578
return None;
579579
}
580580

581-
// FIXME we need to revisit this for #67176
582-
if rvalue.needs_subst() {
583-
return None;
584-
}
585-
586581
// Perform any special handling for specific Rvalue types.
587582
// Generally, checks here fall into one of two categories:
588583
// 1. Additional checking to provide useful lints to the user
@@ -623,6 +618,11 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
623618
_ => {}
624619
}
625620

621+
// FIXME we need to revisit this for #67176
622+
if rvalue.needs_subst() {
623+
return None;
624+
}
625+
626626
self.use_ecx(|this| {
627627
trace!("calling eval_rvalue_into_place(rvalue = {:?}, place = {:?})", rvalue, place);
628628
this.ecx.eval_rvalue_into_place(rvalue, place)?;

0 commit comments

Comments
 (0)