-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #40644 - arielb1:rollup, r=arielb1
Rollup of 22 pull requests - Successful merges: #40241, #40346, #40348, #40377, #40398, #40409, #40441, #40445, #40509, #40521, #40523, #40532, #40538, #40564, #40581, #40583, #40588, #40589, #40590, #40603, #40611, #40621 - Failed merges: #40501, #40541
- Loading branch information
Showing
139 changed files
with
2,012 additions
and
868 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# `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); | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.