1
Fork 0

Rollup merge of #129926 - nnethercote:mv-SanityCheck-and-MirPass, r=cjgillot

Move `SanityCheck` and `MirPass`

They are currently in `rustc_middle`. This PR moves them to `rustc_mir_transform`, which makes more sense.

r? ``@cjgillot``
This commit is contained in:
Matthias Krüger 2024-09-03 19:13:27 +02:00 committed by GitHub
commit 4ed0f0d384
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
59 changed files with 201 additions and 211 deletions

View file

@ -72,7 +72,7 @@ use crate::ssa::{SsaLocals, StorageLiveLocals};
/// so we perform all the possible instantiations without removing the `_1 = &_2` statement.
pub struct ReferencePropagation;
impl<'tcx> MirPass<'tcx> for ReferencePropagation {
impl<'tcx> crate::MirPass<'tcx> for ReferencePropagation {
fn is_enabled(&self, sess: &rustc_session::Session) -> bool {
sess.mir_opt_level() >= 2
}