From b52f6f4ca8a2d04abf2f6481530303c2eabaef18 Mon Sep 17 00:00:00 2001 From: Oliver Scherer Date: Mon, 3 Jun 2019 18:39:38 +0200 Subject: [PATCH] Elaborate on why we don't look at frozenness --- src/librustc_mir/interpret/intern.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/librustc_mir/interpret/intern.rs b/src/librustc_mir/interpret/intern.rs index 47dcde95ca55..b55129bd4196 100644 --- a/src/librustc_mir/interpret/intern.rs +++ b/src/librustc_mir/interpret/intern.rs @@ -168,6 +168,8 @@ fn visit_primitive(&mut self, mplace: MPlaceTy<'tcx>) -> EvalResult<'tcx> { // We do not have any `frozen` logic here, because it's essentially equivalent to // the mutability except for the outermost item. Only `UnsafeCell` can "unfreeze", // and we check that in `visit_aggregate`. + // This is not an inherent limitation, but one that we know to be true, because + // const qualification enforces it. We can lift it in the future. match (self.mode, mutability) { // all is "good and well" in the unsoundness of `static mut` (InternMode::StaticMut, _) => {},