rustc_mir_transform::pass_manager

Trait MirLint

source
pub(crate) trait MirLint<'tcx> {
    // Required method
    fn run_lint(&self, tcx: TyCtxt<'tcx>, body: &Body<'tcx>);

    // Provided methods
    fn name(&self) -> &'static str { ... }
    fn is_enabled(&self, _sess: &Session) -> bool { ... }
}
Expand description

Just like MirPass, except it cannot mutate Body, and MIR dumping is disabled (via the Lint adapter).

Required Methods§

source

fn run_lint(&self, tcx: TyCtxt<'tcx>, body: &Body<'tcx>)

Provided Methods§

source

fn name(&self) -> &'static str

source

fn is_enabled(&self, _sess: &Session) -> bool

Implementors§

source§

impl<'tcx> MirLint<'tcx> for CheckConstItemMutation

source§

impl<'tcx> MirLint<'tcx> for CheckPackedRef

source§

impl<'tcx> MirLint<'tcx> for CheckUndefinedTransmutes

source§

impl<'tcx> MirLint<'tcx> for FunctionItemReferences

source§

impl<'tcx> MirLint<'tcx> for KnownPanicsLint

source§

impl<'tcx> MirLint<'tcx> for CheckLiveDrops

source§

impl<'tcx> MirLint<'tcx> for SanityCheck