From ddfd2c2b3fc6ead2e8a3203882498224823b6d3e Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 22 Apr 2020 19:03:30 +0200 Subject: [PATCH] Revert "Move early needs_subst bailout to _after_ linting." This reverts commit 99492e41b60f21f2f461e8131605e054020d328e. --- src/librustc_mir/transform/const_prop.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/librustc_mir/transform/const_prop.rs b/src/librustc_mir/transform/const_prop.rs index 79dba2c5db8f..77a9be0ed35d 100644 --- a/src/librustc_mir/transform/const_prop.rs +++ b/src/librustc_mir/transform/const_prop.rs @@ -604,6 +604,11 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> { return None; } + // FIXME we need to revisit this for #67176 + if rvalue.needs_subst() { + return None; + } + // Perform any special handling for specific Rvalue types. // Generally, checks here fall into one of two categories: // 1. Additional checking to provide useful lints to the user @@ -644,11 +649,6 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> { _ => {} } - // FIXME we need to revisit this for #67176 - if rvalue.needs_subst() { - return None; - } - self.use_ecx(|this| { trace!("calling eval_rvalue_into_place(rvalue = {:?}, place = {:?})", rvalue, place); this.ecx.eval_rvalue_into_place(rvalue, place)?;