Closed
Description
Hello! I've noticed that the Rust 1.83.0 announcement mentions that it is now possible to reference static
items in const
contexts:
static S: i32 = 25;
const C: &i32 = &S;
But the Rust Reference still says it is not:
All access to a static is safe, but there are a number of restrictions on statics:
- The type must have the
Sync
trait bound to allow thread-safe access.- Constants cannot refer to statics.
I am willing to write a PR for this but I am not sure what the best course of action is. Simply removing that bullet-point would mean having to rephrase the text above it, but I don't know what would sound best (also, a single bullet-point may look weird).
What should I do?
Metadata
Metadata
Assignees
Labels
No labels