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

@ -25,11 +25,10 @@ use rustc_target::abi::{Abi, FieldIdx, HasDataLayout, Size, TargetDataLayout, Va
use tracing::{debug, instrument, trace};
use crate::errors::{AssertLint, AssertLintKind};
use crate::MirLint;
pub struct KnownPanicsLint;
impl<'tcx> MirLint<'tcx> for KnownPanicsLint {
impl<'tcx> crate::MirLint<'tcx> for KnownPanicsLint {
fn run_lint(&self, tcx: TyCtxt<'tcx>, body: &Body<'tcx>) {
if body.tainted_by_errors.is_some() {
return;