diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2023-02-09 18:46:46 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2023-04-15 07:46:46 +0000 |
| commit | 8a515aab76009e302efc52de54419334a76dc24e (patch) | |
| tree | 7cad9efc521a05293dab7c34757aebfad838f932 /compiler/rustc_mir_transform/src | |
| parent | 3312a3053bb9996e56a5ed58b6b9306224ada727 (diff) | |
| download | rust-8a515aab76009e302efc52de54419334a76dc24e.tar.gz rust-8a515aab76009e302efc52de54419334a76dc24e.zip | |
Only enable ConstProp at mir-opt-level >= 2.
Diffstat (limited to 'compiler/rustc_mir_transform/src')
| -rw-r--r-- | compiler/rustc_mir_transform/src/const_prop.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_mir_transform/src/const_prop.rs b/compiler/rustc_mir_transform/src/const_prop.rs index 79a9ac7d20c..ff12a0360aa 100644 --- a/compiler/rustc_mir_transform/src/const_prop.rs +++ b/compiler/rustc_mir_transform/src/const_prop.rs @@ -54,7 +54,7 @@ pub struct ConstProp; impl<'tcx> MirPass<'tcx> for ConstProp { fn is_enabled(&self, sess: &rustc_session::Session) -> bool { - sess.mir_opt_level() >= 1 + sess.mir_opt_level() >= 2 } #[instrument(skip(self, tcx), level = "debug")] |
