diff options
Diffstat (limited to 'compiler/rustc_mir_build/src/check_unsafety.rs')
| -rw-r--r-- | compiler/rustc_mir_build/src/check_unsafety.rs | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/compiler/rustc_mir_build/src/check_unsafety.rs b/compiler/rustc_mir_build/src/check_unsafety.rs index f3e6301d9d1..33e194fa246 100644 --- a/compiler/rustc_mir_build/src/check_unsafety.rs +++ b/compiler/rustc_mir_build/src/check_unsafety.rs @@ -1005,10 +1005,6 @@ pub(crate) fn check_unsafety(tcx: TyCtxt<'_>, def: LocalDefId) { // Runs all other queries that depend on THIR. tcx.ensure_with_value().mir_built(def); let thir = &thir.steal(); - // If `thir` is empty, a type error occurred, skip this body. - if thir.exprs.is_empty() { - return; - } let hir_id = tcx.local_def_id_to_hir_id(def); let safety_context = tcx.hir().fn_sig_by_hir_id(hir_id).map_or(SafetyContext::Safe, |fn_sig| { |
