Remove unnecessary recursive call to parent unsafeck
All bodies are unsafe checked anyway. Current MIR unsafeck also just returns for closures.
This commit is contained in:
parent
adf1717219
commit
5c58a1b003
1 changed files with 0 additions and 3 deletions
|
@ -627,9 +627,6 @@ pub fn check_unsafety<'tcx>(tcx: TyCtxt<'tcx>, def: ty::WithOptConstParam<LocalD
|
||||||
|
|
||||||
// Closures and inline consts are handled by their owner, if it has a body
|
// Closures and inline consts are handled by their owner, if it has a body
|
||||||
if tcx.is_typeck_child(def.did.to_def_id()) {
|
if tcx.is_typeck_child(def.did.to_def_id()) {
|
||||||
let hir = tcx.hir();
|
|
||||||
let owner = hir.enclosing_body_owner(hir.local_def_id_to_hir_id(def.did));
|
|
||||||
tcx.ensure().thir_check_unsafety(owner);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue