Auto merge of #112834 - oli-obk:mir_opts_considered_unsound, r=cjgillot
Disable two mir opts that are known to be unsound closes #112460 (does not fix the underlying issue) r? `@cjgillot`
This commit is contained in:
commit
38b44eb233
9 changed files with 177 additions and 184 deletions
|
@ -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>) {
|
||||
|
|
|
@ -46,7 +46,9 @@ pub struct SeparateConstSwitch;
|
|||
|
||||
impl<'tcx> MirPass<'tcx> for SeparateConstSwitch {
|
||||
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>) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue