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:
@@ -3,11 +3,11 @@ use rustc_middle::mir::*;
|
||||
use rustc_middle::span_bug;
|
||||
use rustc_middle::ty::{self, TyCtxt};
|
||||
|
||||
use crate::{errors, util, MirLint};
|
||||
use crate::{errors, util};
|
||||
|
||||
pub struct CheckPackedRef;
|
||||
|
||||
impl<'tcx> MirLint<'tcx> for CheckPackedRef {
|
||||
impl<'tcx> crate::MirLint<'tcx> for CheckPackedRef {
|
||||
fn run_lint(&self, tcx: TyCtxt<'tcx>, body: &Body<'tcx>) {
|
||||
let param_env = tcx.param_env(body.source.def_id());
|
||||
let source_info = SourceInfo::outermost(body.span);
|
||||
|
||||
Reference in New Issue
Block a user