about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2019-11-27 23:36:39 +0100
committerRalf Jung <post@ralfj.de>2019-11-27 23:36:39 +0100
commit2869abacfa12ce3946234e5554d160fc932d933d (patch)
tree80890eee33cfcb83694a4788722ff06fca5f88b9 /src
parent3e7a5a4e0bdf13f504922c9e9b5c539cd57b576f (diff)
downloadrust-2869abacfa12ce3946234e5554d160fc932d933d.tar.gz
rust-2869abacfa12ce3946234e5554d160fc932d933d.zip
comment
Diffstat (limited to 'src')
-rw-r--r--src/librustc_mir/interpret/place.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/librustc_mir/interpret/place.rs b/src/librustc_mir/interpret/place.rs
index c03d1da6777..70d9836b6ff 100644
--- a/src/librustc_mir/interpret/place.rs
+++ b/src/librustc_mir/interpret/place.rs
@@ -658,6 +658,13 @@ where
                 PlaceTy {
                     place: match self.frame().return_place {
                         Some(p) => *p,
+                        // Even if we don't have a return place, we sometimes need to
+                        // create this place, but any attempt to read from / write to it
+                        // (even a ZST read/write) needs to error, so let us make this
+                        // a NULL place.
+                        //
+                        // FIXME: Ideally we'd make sure that the place projections also
+                        // bail out.
                         None => Place::null(&*self),
                     },
                     layout: self.layout_of(