about summary refs log tree commit diff
path: root/compiler/rustc_const_eval
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-01-31 17:19:32 +0000
committerMichael Goulet <michael@errs.io>2025-01-31 17:40:28 +0000
commit442b9a93872096a6e51e23f36f14f2dacf5520ce (patch)
tree46d2158eab57b7b89de7fd27224b777b5f6a664a /compiler/rustc_const_eval
parentb63341e892447f73888f858052bca57495ee8d67 (diff)
downloadrust-442b9a93872096a6e51e23f36f14f2dacf5520ce.tar.gz
rust-442b9a93872096a6e51e23f36f14f2dacf5520ce.zip
Validation
Diffstat (limited to 'compiler/rustc_const_eval')
-rw-r--r--compiler/rustc_const_eval/src/interpret/step.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/step.rs b/compiler/rustc_const_eval/src/interpret/step.rs
index beae5047e7e..abe73c43d8a 100644
--- a/compiler/rustc_const_eval/src/interpret/step.rs
+++ b/compiler/rustc_const_eval/src/interpret/step.rs
@@ -279,6 +279,8 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
             }
 
             WrapUnsafeBinder(ref op, _ty) => {
+                // Constructing an unsafe binder acts like a transmute
+                // since the operand's layout does not change.
                 let op = self.eval_operand(op, None)?;
                 self.copy_op_allow_transmute(&op, &dest)?;
             }