forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
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 rust-lang#102867 - JohnTitor:rollup-qnwsajt, r=JohnTitor
Rollup of 6 pull requests Successful merges: - rust-lang#102275 (Stabilize `half_open_range_patterns`) - rust-lang#102323 (Trying to suggest additional lifetime parameter) - rust-lang#102345 (Recover from impl Trait in type param bound) - rust-lang#102845 (Elaborate trait ref to compute object safety.) - rust-lang#102860 (Add missing documentation for FileNameDisplayPreference variants) - rust-lang#102862 (From<Alignment> for usize & NonZeroUsize) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
65 changed files
with
507 additions
and
442 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
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
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
30 changes: 30 additions & 0 deletions
30
src/doc/unstable-book/src/language-features/half-open-range-patterns-in-slices.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,30 @@ | ||
# `half_open_range_patterns_in_slices` | ||
|
||
The tracking issue for this feature is: [#67264] | ||
It is part of the `exclusive_range_pattern` feature, | ||
tracked at [#37854]. | ||
|
||
[#67264]: https://github.com/rust-lang/rust/issues/67264 | ||
[#37854]: https://github.com/rust-lang/rust/issues/37854 | ||
----- | ||
|
||
This feature allow using top-level half-open range patterns in slices. | ||
|
||
```rust | ||
#![feature(half_open_range_patterns_in_slices)] | ||
#![feature(exclusive_range_pattern)] | ||
|
||
fn main() { | ||
let xs = [13, 1, 5, 2, 3, 1, 21, 8]; | ||
let [a @ 3.., b @ ..3, c @ 4..6, ..] = xs else { return; }; | ||
} | ||
``` | ||
|
||
Note that this feature is not required if the patterns are wrapped between parenthesis. | ||
|
||
```rust | ||
fn main() { | ||
let xs = [13, 1]; | ||
let [(a @ 3..), c] = xs else { return; }; | ||
} | ||
``` |
27 changes: 0 additions & 27 deletions
27
src/doc/unstable-book/src/language-features/half-open-range-patterns.md
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
src/test/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs
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
2 changes: 1 addition & 1 deletion
2
src/test/ui/half-open-range-patterns/exclusive_range_pattern_syntax_collision.rs
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
2 changes: 1 addition & 1 deletion
2
src/test/ui/half-open-range-patterns/exclusive_range_pattern_syntax_collision2.rs
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
1 change: 0 additions & 1 deletion
1
src/test/ui/half-open-range-patterns/exclusive_range_pattern_syntax_collision3.rs
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
#![feature(half_open_range_patterns)] | ||
#![feature(exclusive_range_pattern)] | ||
|
||
fn main() { | ||
|
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
7 changes: 7 additions & 0 deletions
7
src/test/ui/half-open-range-patterns/feature-gate-half-open-range-patterns-in-slices.rs
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,7 @@ | ||
#![feature(exclusive_range_pattern)] | ||
|
||
fn main() { | ||
let xs = [13, 1, 5, 2, 3, 1, 21, 8]; | ||
let [a @ 3.., b @ ..3, c @ 4..6, ..] = xs; | ||
//~^ `X..` patterns in slices are experimental | ||
} |
Oops, something went wrong.