Skip to content

Commit e2a433a

Browse files
brsonManishearth
authored andcommitted
Feature gate *all* slice patterns. rust-lang#23121
Until some backwards-compatibility hazards are fixed in rust-lang#23121, these need to be unstable. [breaking-change]
1 parent 2361606 commit e2a433a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

reference.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -2337,9 +2337,13 @@ considered off, and using the features will result in a compiler error.
23372337

23382338
The currently implemented features of the reference compiler are:
23392339

2340-
* `advanced_slice_patterns` - see the [match expressions](#match-expressions)
2340+
* `advanced_slice_patterns` - See the [match expressions](#match-expressions)
23412341
section for discussion; the exact semantics of
2342-
slice patterns are subject to change.
2342+
slice patterns are subject to change, so some types
2343+
are still unstable.
2344+
2345+
* `slice_patterns` - OK, actually, slice patterns are just scary and
2346+
completely unstable.
23432347

23442348
* `asm` - The `asm!` macro provides a means for inline assembly. This is often
23452349
useful, but the exact syntax for this feature along with its
@@ -3255,7 +3259,7 @@ array, like `[.., 42, ..]`. If preceded by a variable name, it will bind the
32553259
corresponding slice to the variable. Example:
32563260

32573261
```
3258-
# #![feature(advanced_slice_patterns)]
3262+
# #![feature(advanced_slice_patterns, slice_patterns)]
32593263
fn is_symmetric(list: &[u32]) -> bool {
32603264
match list {
32613265
[] | [_] => true,

0 commit comments

Comments
 (0)