1
Fork 0

Disable NormalizeArrayLen

This commit is contained in:
Jakob Degen 2022-12-19 17:38:18 -08:00
parent 01ef4b21dc
commit 4251289f27
5 changed files with 12 additions and 19 deletions

View file

@ -16,7 +16,8 @@ pub struct NormalizeArrayLen;
impl<'tcx> MirPass<'tcx> for NormalizeArrayLen {
fn is_enabled(&self, sess: &rustc_session::Session) -> bool {
sess.mir_opt_level() >= 4
// See #105929
sess.mir_opt_level() >= 4 && sess.opts.unstable_opts.unsound_mir_opts
}
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {