about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorAndy Wang <cbeuw.andy@gmail.com>2023-05-15 12:05:10 +0200
committerAndy Wang <cbeuw.andy@gmail.com>2023-05-15 12:05:10 +0200
commitc3ab4f28d37c9577dc401a08a72f82b752d32e53 (patch)
tree5f1cec1803480a5ae840e48ea5a36cf73ce4b16a /compiler
parent0bcfd2d96efe7a2cb5205c3af1b9eea17423fe65 (diff)
Add CopyForDeref to custom MIR
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_mir_build/src/build/custom/parse/instruction.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_mir_build/src/build/custom/parse/instruction.rs b/compiler/rustc_mir_build/src/build/custom/parse/instruction.rs
index 931fe1b2433..b74422708ce 100644
--- a/compiler/rustc_mir_build/src/build/custom/parse/instruction.rs
+++ b/compiler/rustc_mir_build/src/build/custom/parse/instruction.rs
@@ -154,6 +154,7 @@ impl<'tcx, 'body> ParseCtxt<'tcx, 'body> {
                 Ok(Rvalue::BinaryOp(BinOp::Offset, Box::new((ptr, offset))))
             },
             @call("mir_len", args) => Ok(Rvalue::Len(self.parse_place(args[0])?)),
+            @call("mir_copy_for_deref", args) => Ok(Rvalue::CopyForDeref(self.parse_place(args[0])?)),
             ExprKind::Borrow { borrow_kind, arg } => Ok(
                 Rvalue::Ref(self.tcx.lifetimes.re_erased, *borrow_kind, self.parse_place(*arg)?)
             ),