about summary refs log tree commit diff
path: root/compiler/rustc_mir_dataflow/src/move_paths/builder.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-01-31 01:24:37 +0000
committerMichael Goulet <michael@errs.io>2025-01-31 17:19:53 +0000
commitfc1a9186dcdad111fd99ddd38bd961a8a205c380 (patch)
treec60452a9af751853a3ccef6e8eefd0dc145685a5 /compiler/rustc_mir_dataflow/src/move_paths/builder.rs
parent7f36543a48e52912ac6664a70c0a5b9d86509eaf (diff)
downloadrust-fc1a9186dcdad111fd99ddd38bd961a8a205c380.tar.gz
rust-fc1a9186dcdad111fd99ddd38bd961a8a205c380.zip
Implement MIR, CTFE, and codegen for unsafe binders
Diffstat (limited to 'compiler/rustc_mir_dataflow/src/move_paths/builder.rs')
-rw-r--r--compiler/rustc_mir_dataflow/src/move_paths/builder.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_mir_dataflow/src/move_paths/builder.rs b/compiler/rustc_mir_dataflow/src/move_paths/builder.rs
index d1b3a389e9e..6e00e427a46 100644
--- a/compiler/rustc_mir_dataflow/src/move_paths/builder.rs
+++ b/compiler/rustc_mir_dataflow/src/move_paths/builder.rs
@@ -208,7 +208,7 @@ impl<'a, 'tcx, F: Fn(Ty<'tcx>) -> bool> MoveDataBuilder<'a, 'tcx, F> {
                     | ty::Infer(_)
                     | ty::Error(_)
                     | ty::Placeholder(_) => bug!(
-                        "When Place contains ProjectionElem::Field it's type shouldn't be {place_ty:#?}"
+                        "When Place contains ProjectionElem::Field its type shouldn't be {place_ty:#?}"
                     ),
                 },
                 ProjectionElem::ConstantIndex { .. } | ProjectionElem::Subslice { .. } => {
@@ -226,6 +226,7 @@ impl<'a, 'tcx, F: Fn(Ty<'tcx>) -> bool> MoveDataBuilder<'a, 'tcx, F> {
                     }
                     _ => bug!("Unexpected type {place_ty:#?}"),
                 },
+                ProjectionElem::UnwrapUnsafeBinder(_) => {}
                 // `OpaqueCast`:Only transmutes the type, so no moves there.
                 // `Downcast`  :Only changes information about a `Place` without moving.
                 // `Subtype`   :Only transmutes the type, so moves.
@@ -399,7 +400,8 @@ impl<'a, 'tcx, F: Fn(Ty<'tcx>) -> bool> MoveDataBuilder<'a, 'tcx, F> {
             | Rvalue::Repeat(ref operand, _)
             | Rvalue::Cast(_, ref operand, _)
             | Rvalue::ShallowInitBox(ref operand, _)
-            | Rvalue::UnaryOp(_, ref operand) => self.gather_operand(operand),
+            | Rvalue::UnaryOp(_, ref operand)
+            | Rvalue::WrapUnsafeBinder(ref operand, _) => self.gather_operand(operand),
             Rvalue::BinaryOp(ref _binop, box (ref lhs, ref rhs)) => {
                 self.gather_operand(lhs);
                 self.gather_operand(rhs);