about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src/base.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-01-31 02:04:10 +0000
committerMichael Goulet <michael@errs.io>2025-01-31 17:40:28 +0000
commitb63341e892447f73888f858052bca57495ee8d67 (patch)
tree33f254d4c70018d8fd6d232f904c2c682e10a78a /compiler/rustc_codegen_cranelift/src/base.rs
parentfc1a9186dcdad111fd99ddd38bd961a8a205c380 (diff)
downloadrust-b63341e892447f73888f858052bca57495ee8d67.tar.gz
rust-b63341e892447f73888f858052bca57495ee8d67.zip
Enforce unsafe binders must be Copy (for now)
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/base.rs')
-rw-r--r--compiler/rustc_codegen_cranelift/src/base.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/base.rs b/compiler/rustc_codegen_cranelift/src/base.rs
index ea37e19099a..97d8baa6157 100644
--- a/compiler/rustc_codegen_cranelift/src/base.rs
+++ b/compiler/rustc_codegen_cranelift/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(_)