From 433c1aec2195eb8864e46bf24f50f74123bbb284 Mon Sep 17 00:00:00 2001 From: Fabian Wolff Date: Tue, 8 Jun 2021 17:19:16 +0200 Subject: Check whether the closure's owner has a body before deferring to it in thir-unsafeck --- compiler/rustc_mir_build/src/check_unsafety.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'compiler') diff --git a/compiler/rustc_mir_build/src/check_unsafety.rs b/compiler/rustc_mir_build/src/check_unsafety.rs index 2d52577829c..72a55909e15 100644 --- a/compiler/rustc_mir_build/src/check_unsafety.rs +++ b/compiler/rustc_mir_build/src/check_unsafety.rs @@ -368,10 +368,15 @@ pub fn check_unsafety<'tcx>(tcx: TyCtxt<'tcx>, def: ty::WithOptConstParam