From 6c0f4bbd7549afae7800aaf2a897d0807726a6e1 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Fri, 31 Jan 2025 02:04:10 +0000 Subject: Enforce unsafe binders must be Copy (for now) --- src/base.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/base.rs b/src/base.rs index ea37e19099a..97d8baa6157 100644 --- a/src/base.rs +++ b/src/base.rs @@ -915,6 +915,10 @@ fn codegen_stmt<'tcx>( } crate::discriminant::codegen_set_discriminant(fx, lval, variant_index); } + Rvalue::WrapUnsafeBinder(ref operand, _to_ty) => { + let operand = codegen_operand(fx, operand); + lval.write_cvalue_transmute(fx, operand); + } } } StatementKind::StorageLive(_) -- cgit 1.4.1-3-g733a5