Update passes with new interface
This commit is contained in:
parent
c1a501b131
commit
fd18b45e11
32 changed files with 142 additions and 99 deletions
|
@ -11,12 +11,12 @@ use rustc_session::lint::builtin::FUNCTION_ITEM_REFERENCES;
|
|||
use rustc_span::{symbol::sym, Span};
|
||||
use rustc_target::spec::abi::Abi;
|
||||
|
||||
use crate::MirPass;
|
||||
use crate::MirLint;
|
||||
|
||||
pub struct FunctionItemReferences;
|
||||
|
||||
impl<'tcx> MirPass<'tcx> for FunctionItemReferences {
|
||||
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
||||
impl<'tcx> 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