From 2869abacfa12ce3946234e5554d160fc932d933d Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 27 Nov 2019 23:36:39 +0100 Subject: [PATCH] comment --- src/librustc_mir/interpret/place.rs | 7 +++++++ 1 file changed, 7 insertions(+) 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 @@ pub fn eval_place( 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( -- 2.44.0