
Because that's now the only crate that uses it. Moving stuff out of `rustc_middle` is always welcome. I chose to use `impl crate::MirPass`/`impl crate::MirLint` (with explicit `crate::`) everywhere because that's the only mention of `MirPass`/`MirLint` used in all of these files. (Prior to this change, `MirPass` was mostly imported via `use rustc_middle::mir::*` items.)
11 lines
296 B
Rust
11 lines
296 B
Rust
use rustc_middle::mir::Body;
|
|
use rustc_middle::ty::TyCtxt;
|
|
use rustc_mir_dataflow::rustc_peek::sanity_check;
|
|
|
|
pub(super) struct SanityCheck;
|
|
|
|
impl<'tcx> crate::MirLint<'tcx> for SanityCheck {
|
|
fn run_lint(&self, tcx: TyCtxt<'tcx>, body: &Body<'tcx>) {
|
|
sanity_check(tcx, body);
|
|
}
|
|
}
|