mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
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
@ -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
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user