-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 #61749 - davidtwco:rfc-2203-const-array-repeat-exprs, r…
…=eddyb rustc/rustc_mir: Implement RFC 2203. This PR implements RFC 2203, allowing constants in array repeat expressions. Part of #49147. r? @eddyb
- Loading branch information
Showing
25 changed files
with
659 additions
and
142 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
src/doc/unstable-book/src/language-features/const-in-array-repeat-expressions.md
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,11 @@ | ||
# `const_in_array_repeat_expressions` | ||
|
||
The tracking issue for this feature is: [#49147] | ||
|
||
[#44109]: https://github.com/rust-lang/rust/issues/49147 | ||
|
||
------------------------ | ||
|
||
Relaxes the rules for repeat expressions, `[x; N]` such that `x` may also be `const` (strictly | ||
speaking rvalue promotable), in addition to `typeof(x): Copy`. The result of `[x; N]` where `x` is | ||
`const` is itself also `const`. |
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.