Migrate "unsafe_op_in_unsafe_fn" lints
This commit is contained in:
parent
82f05446a5
commit
71fe52fed0
4 changed files with 236 additions and 14 deletions
|
@ -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 },
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue