Rollup merge of #105930 - JakobDegen:nal-unsound, r=oli-obk

Disable `NormalizeArrayLen`

cc #105929

r? mir-opt
This commit is contained in:
Matthias Krüger 2022-12-20 14:37:32 +01:00 committed by GitHub
commit c3af456d6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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>) {