mirror of https://github.com/rust-lang/reference
Add feature flag to reference docs for RFC 1623.
This commit is contained in:
parent
b836c03d9d
commit
9797537daf
|
@ -1376,7 +1376,7 @@ unsafe fn bump_levels_unsafe2() -> u32 {
|
|||
Mutable statics have the same restrictions as normal statics, except that the
|
||||
type of the value is not required to ascribe to `Sync`.
|
||||
|
||||
#### `'static` lifetime elision
|
||||
#### `'static` lifetime elision [unstable]
|
||||
|
||||
Both constant and static declarations of reference types have *implicit*
|
||||
`'static` lifetimes unless an explicit lifetime is specified. As such, the
|
||||
|
@ -1384,6 +1384,7 @@ constant declarations involving `'static` above may be written without the
|
|||
lifetimes. Returning to our previous example:
|
||||
|
||||
```rust
|
||||
#[feature(static_in_const)]
|
||||
const BIT1: u32 = 1 << 0;
|
||||
const BIT2: u32 = 1 << 1;
|
||||
|
||||
|
|
Loading…
Reference in New Issue