about summary refs log tree commit diff
path: root/src
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
commit6c0f4bbd7549afae7800aaf2a897d0807726a6e1 (patch)
treeb0a9759552f61b0a689768ccda2ebea431dd3858 /src
parent83ab12f0dc1087b53316eaa1c1611dad65551fa0 (diff)
downloadrust-6c0f4bbd7549afae7800aaf2a897d0807726a6e1.tar.gz
rust-6c0f4bbd7549afae7800aaf2a897d0807726a6e1.zip
Enforce unsafe binders must be Copy (for now)
Diffstat (limited to 'src')
-rw-r--r--src/base.rs4
1 files changed, 4 insertions, 0 deletions
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(_)