Move MirPass to rustc_mir_transform.
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.)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user