about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2022-09-06 18:41:01 +0200
committerCamille GILLOT <gillot.camille@gmail.com>2023-03-09 17:45:13 +0000
commit82e675061c28fe99db0c94058164a3485357250a (patch)
tree5d581fdbeffd3b2d9993164a033a40755b24047f
parent2ad8e1fb51bb998d353bbf500c3a6c3544b9110a (diff)
downloadrust-82e675061c28fe99db0c94058164a3485357250a.tar.gz
rust-82e675061c28fe99db0c94058164a3485357250a.zip
Introduce a no-op PlaceMention statement for `let _ =`.
-rw-r--r--src/base.rs1
-rw-r--r--src/constant.rs1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/base.rs b/src/base.rs
index cb0e272ceda..230256ba5aa 100644
--- a/src/base.rs
+++ b/src/base.rs
@@ -819,6 +819,7 @@ fn codegen_stmt<'tcx>(
         | StatementKind::Nop
         | StatementKind::FakeRead(..)
         | StatementKind::Retag { .. }
+        | StatementKind::PlaceMention(..)
         | StatementKind::AscribeUserType(..) => {}
 
         StatementKind::Coverage { .. } => fx.tcx.sess.fatal("-Zcoverage is unimplemented"),
diff --git a/src/constant.rs b/src/constant.rs
index 1930db72ead..efdf9f6d5bc 100644
--- a/src/constant.rs
+++ b/src/constant.rs
@@ -529,6 +529,7 @@ pub(crate) fn mir_operand_get_const_val<'tcx>(
                         | StatementKind::StorageDead(_)
                         | StatementKind::Retag(_, _)
                         | StatementKind::AscribeUserType(_, _)
+                        | StatementKind::PlaceMention(..)
                         | StatementKind::Coverage(_)
                         | StatementKind::ConstEvalCounter
                         | StatementKind::Nop => {}