diff options
| author | jumbatm <jumbatm@gmail.com> | 2020-04-02 04:33:39 +1000 |
|---|---|---|
| committer | jumbatm <jumbatm@gmail.com> | 2020-04-15 08:58:45 +1000 |
| commit | 99492e41b60f21f2f461e8131605e054020d328e (patch) | |
| tree | 6abc46697adb5dce9097cc414d65158baa642c3e | |
| parent | 3e6609e7bf85cfb0ee866a2d5b009b3b905b9200 (diff) | |
| download | rust-99492e41b60f21f2f461e8131605e054020d328e.tar.gz rust-99492e41b60f21f2f461e8131605e054020d328e.zip | |
Move early needs_subst bailout to _after_ linting.
This ensures we get still get lints for generic contexts.
| -rw-r--r-- | src/librustc_mir/transform/const_prop.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/librustc_mir/transform/const_prop.rs b/src/librustc_mir/transform/const_prop.rs index 9a6d5ab34a5..fbf4a72ab21 100644 --- a/src/librustc_mir/transform/const_prop.rs +++ b/src/librustc_mir/transform/const_prop.rs @@ -578,11 +578,6 @@ 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 @@ -623,6 +618,11 @@ 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)?; |
