Rollup merge of #121782 - RalfJung:mutable-ref-in-static, r=oli-obk
allow statics pointing to mutable statics Fixes https://github.com/rust-lang/rust/issues/120450 for good. We can even simplify our checks: no need to specifically go looking for mutable references in const, we can just reject any reference that points to something mutable. r? `@oli-obk`
This commit is contained in:
commit
255fdcc858
12 changed files with 64 additions and 307 deletions
|
@ -420,7 +420,6 @@ pub enum ValidationErrorKind<'tcx> {
|
|||
PartialPointer,
|
||||
PtrToUninhabited { ptr_kind: PointerKind, ty: Ty<'tcx> },
|
||||
PtrToStatic { ptr_kind: PointerKind },
|
||||
MutableRefInConstOrStatic,
|
||||
ConstRefToMutable,
|
||||
ConstRefToExtern,
|
||||
MutableRefToImmutable,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue