Elaborate on why we don't look at frozenness

This commit is contained in:
Oliver Scherer
2019-06-03 18:39:38 +02:00
parent 870a6dc230
commit b52f6f4ca8
+2
View File
@@ -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, _) => {},