mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-31 05:26:23 +03:00
Elaborate on why we don't look at frozenness
This commit is contained in:
@@ -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, _) => {},
|
||||
|
||||
Reference in New Issue
Block a user