diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-06-20 10:04:34 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-06-21 07:41:09 +0000 |
| commit | c409f05636437726251456297ff67c08ab0841aa (patch) | |
| tree | 70c4bd900655e1038cdcf5fa0b825d06fb2f51d3 /compiler/rustc_mir_transform/src/const_goto.rs | |
| parent | c55d1ee8d4e3162187214692229a63c2cc5e0f31 (diff) | |
| download | rust-c409f05636437726251456297ff67c08ab0841aa.tar.gz rust-c409f05636437726251456297ff67c08ab0841aa.zip | |
Disable two mir opts that are known to be unsound
Diffstat (limited to 'compiler/rustc_mir_transform/src/const_goto.rs')
| -rw-r--r-- | compiler/rustc_mir_transform/src/const_goto.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_mir_transform/src/const_goto.rs b/compiler/rustc_mir_transform/src/const_goto.rs index 024bea62098..e175f22d7a9 100644 --- a/compiler/rustc_mir_transform/src/const_goto.rs +++ b/compiler/rustc_mir_transform/src/const_goto.rs @@ -28,7 +28,9 @@ pub struct ConstGoto; impl<'tcx> MirPass<'tcx> for ConstGoto { fn is_enabled(&self, sess: &rustc_session::Session) -> bool { - sess.mir_opt_level() >= 2 + // This pass participates in some as-of-yet untested unsoundness found + // in https://github.com/rust-lang/rust/issues/112460 + sess.mir_opt_level() >= 2 && sess.opts.unstable_opts.unsound_mir_opts } fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) { |
