about summary refs log tree commit diff
path: root/tests/ui/static/raw-ref-static-mut.rs
AgeCommit message (Collapse)AuthorLines
2024-08-18stabilize raw_ref_opRalf Jung-1/+0
2024-07-22compiler: treat `&raw (const|mut) UNSAFE_STATIC` implied deref as safeJubilee Young-0/+17
The implied deref to statics introduced by HIR->THIR lowering is only used to create place expressions, it lacks unsafe semantics. It is also confusing, as there is no visible `*ident` in the source. For both classes of "unsafe static" (extern static and static mut) allow this operation. We lack a clear story around `thread_local! { static mut }`, which is actually its own category of item that reuses the static syntax but has its own rules. It's possible they should be similarly included, but in the absence of a good reason one way or another, we do not bless it.