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:
parent
5410900aaa
commit
2aae619edb
58 changed files with 143 additions and 162 deletions
|
@ -9,11 +9,11 @@ use rustc_span::symbol::sym;
|
|||
use rustc_span::Span;
|
||||
use rustc_target::spec::abi::Abi;
|
||||
|
||||
use crate::{errors, MirLint};
|
||||
use crate::errors;
|
||||
|
||||
pub struct FunctionItemReferences;
|
||||
|
||||
impl<'tcx> MirLint<'tcx> for FunctionItemReferences {
|
||||
impl<'tcx> crate::MirLint<'tcx> for FunctionItemReferences {
|
||||
fn run_lint(&self, tcx: TyCtxt<'tcx>, body: &Body<'tcx>) {
|
||||
let mut checker = FunctionItemRefChecker { tcx, body };
|
||||
checker.visit_body(body);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue