1
Fork 0

Migrate "unsafe_op_in_unsafe_fn" lints

This commit is contained in:
TheOddGarlic 2022-08-20 23:54:58 +03:00 committed by mejrs
parent 82f05446a5
commit 71fe52fed0
4 changed files with 236 additions and 14 deletions

View file

@ -37,10 +37,12 @@ pub(crate) fn check<'tcx>(tcx: TyCtxt<'tcx>, body: &Body<'tcx>) {
let sp = tcx.def_span(def_id);
let hir_id = tcx.hir().local_def_id_to_hir_id(def_id);
tcx.emit_spanned_lint(UNCONDITIONAL_RECURSION, hir_id, sp, UnconditionalRecursion {
span: sp,
call_sites: vis.reachable_recursive_calls,
});
tcx.emit_spanned_lint(
UNCONDITIONAL_RECURSION,
hir_id,
sp,
UnconditionalRecursion { span: sp, call_sites: vis.reachable_recursive_calls },
);
}
}