File tree 3 files changed +5
-1
lines changed
compiler/rustc_mir_transform/src
3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ pub struct EarlyOtherwiseBranch;
95
95
96
96
impl < ' tcx > MirPass < ' tcx > for EarlyOtherwiseBranch {
97
97
fn is_enabled ( & self , sess : & rustc_session:: Session ) -> bool {
98
+ // unsound: https://github.com/rust-lang/rust/issues/95162
98
99
sess. mir_opt_level ( ) >= 3 && sess. opts . unstable_opts . unsound_mir_opts
99
100
}
100
101
Original file line number Diff line number Diff line change @@ -30,6 +30,9 @@ pub struct EnumSizeOpt {
30
30
31
31
impl < ' tcx > MirPass < ' tcx > for EnumSizeOpt {
32
32
fn is_enabled ( & self , sess : & Session ) -> bool {
33
+ // There are some differences in behavior on wasm and ARM that are not properly
34
+ // understood, so we conservatively treat this optimization as unsound:
35
+ // https://github.com/rust-lang/rust/pull/85158#issuecomment-1101836457
33
36
sess. opts . unstable_opts . unsound_mir_opts || sess. mir_opt_level ( ) >= 3
34
37
}
35
38
fn run_pass ( & self , tcx : TyCtxt < ' tcx > , body : & mut Body < ' tcx > ) {
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ pub struct RenameReturnPlace;
34
34
35
35
impl < ' tcx > MirPass < ' tcx > for RenameReturnPlace {
36
36
fn is_enabled ( & self , sess : & rustc_session:: Session ) -> bool {
37
- // #111005
37
+ // unsound: #111005
38
38
sess. mir_opt_level ( ) > 0 && sess. opts . unstable_opts . unsound_mir_opts
39
39
}
40
40
You can’t perform that action at this time.
0 commit comments