]> git.lizzy.rs Git - rust.git/commitdiff
Add feature flag to reference docs for RFC 1623.
authorChris Krycho <chris@chriskrycho.com>
Sat, 28 Jan 2017 14:42:32 +0000 (09:42 -0500)
committerChris Krycho <chris@chriskrycho.com>
Sat, 28 Jan 2017 14:42:32 +0000 (09:42 -0500)
src/doc/reference.md

index 713e6f1ab99eb67ba214986eea40a5a5e4386ea4..c6fc2ea40590c825af07db5aa105d727ceec99b2 100644 (file)
@@ -1356,7 +1356,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
@@ -1364,6 +1364,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;