about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/interpret
diff options
context:
space:
mode:
authorb-naber <bn263@gmx.de>2022-04-26 10:58:45 +0200
committerb-naber <bn263@gmx.de>2022-04-26 18:40:15 +0200
commitbfefb4d74cbd1520afaa97db1eba59c06283c696 (patch)
tree3bc8e0ed4f06aa3f5bf61b641973f3b3b9fe0c6a /compiler/rustc_const_eval/src/interpret
parent6fc3e630fb98cc6200f60ebbb7c7f826b2d48407 (diff)
downloadrust-bfefb4d74cbd1520afaa97db1eba59c06283c696.tar.gz
rust-bfefb4d74cbd1520afaa97db1eba59c06283c696.zip
account for custom DSTs in valtree -> constvalue conversion
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret')
-rw-r--r--compiler/rustc_const_eval/src/interpret/place.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/place.rs b/compiler/rustc_const_eval/src/interpret/place.rs
index 3bc6494f008..380eb526361 100644
--- a/compiler/rustc_const_eval/src/interpret/place.rs
+++ b/compiler/rustc_const_eval/src/interpret/place.rs
@@ -115,6 +115,12 @@ impl<'tcx, Tag: Provenance> std::ops::Deref for MPlaceTy<'tcx, Tag> {
     }
 }
 
+impl<'tcx, Tag: Provenance> std::ops::DerefMut for MPlaceTy<'tcx, Tag> {
+    fn deref_mut(&mut self) -> &mut Self::Target {
+        &mut self.mplace
+    }
+}
+
 impl<'tcx, Tag: Provenance> From<MPlaceTy<'tcx, Tag>> for PlaceTy<'tcx, Tag> {
     #[inline(always)]
     fn from(mplace: MPlaceTy<'tcx, Tag>) -> Self {