diff options
| author | bors <bors@rust-lang.org> | 2017-08-16 21:00:21 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-08-16 21:00:21 +0000 |
| commit | 7ac979d8cbe97241fd39f4037e1d4069caaff4d2 (patch) | |
| tree | 32d267345c20b109c744b01962c525961550ce54 /src/doc | |
| parent | 3f94b7103bef77b22ff436b148792834b9e44065 (diff) | |
| parent | 014333fbd422f56628a2b5b707d192cef838afc3 (diff) | |
| download | rust-7ac979d8cbe97241fd39f4037e1d4069caaff4d2.tar.gz rust-7ac979d8cbe97241fd39f4037e1d4069caaff4d2.zip | |
Auto merge of #43838 - eddyb:stable-rvalue-promotion, r=arielb1
Stabilize rvalue promotion to 'static. Closes #38865. Documentation PR at rust-lang-nursery/reference#98.
Diffstat (limited to 'src/doc')
| m--------- | src/doc/reference | 0 | ||||
| -rw-r--r-- | src/doc/unstable-book/src/language-features/rvalue-static-promotion.md | 23 |
2 files changed, 0 insertions, 23 deletions
diff --git a/src/doc/reference b/src/doc/reference -Subproject 1abfbaa70313fdf527cf799ffd9b9a096a62105 +Subproject 266d429a48468371d2d90669f6a30dd659bb4bd diff --git a/src/doc/unstable-book/src/language-features/rvalue-static-promotion.md b/src/doc/unstable-book/src/language-features/rvalue-static-promotion.md deleted file mode 100644 index 2583d350ebe..00000000000 --- a/src/doc/unstable-book/src/language-features/rvalue-static-promotion.md +++ /dev/null @@ -1,23 +0,0 @@ -# `rvalue_static_promotion` - -The tracking issue for this feature is: [#38865] - -[#38865]: https://github.com/rust-lang/rust/issues/38865 - ------------------------- - -The `rvalue_static_promotion` feature allows directly creating `'static` references to -constant `rvalue`s, which in particular allowing for more concise code in the common case -in which a `'static` reference is all that's needed. - - -## Examples - -```rust -#![feature(rvalue_static_promotion)] - -fn main() { - let DEFAULT_VALUE: &'static u32 = &42; - assert_eq!(*DEFAULT_VALUE, 42); -} -``` |
