Skip to content

Commit 298c251

Browse files
committed
large_enums mir pass: fix is_enabled logic
1 parent 8a70352 commit 298c251

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

compiler/rustc_mir_transform/src/large_enums.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ impl<'tcx> crate::MirPass<'tcx> for EnumSizeOpt {
3232
fn is_enabled(&self, sess: &Session) -> bool {
3333
// There are some differences in behavior on wasm and ARM that are not properly
3434
// understood, so we conservatively treat this optimization as unsound:
35-
// https://github.com/rust-lang/rust/pull/85158#issuecomment-1101836457
36-
sess.opts.unstable_opts.unsound_mir_opts || sess.mir_opt_level() >= 3
35+
// https://github.com/rust-lang/rust/issues/154413
36+
sess.opts.unstable_opts.unsound_mir_opts && sess.mir_opt_level() >= 3
3737
}
3838

3939
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {

0 commit comments

Comments
 (0)