Skip to content

Commit

Permalink
Feature gate *all* slice patterns. rust-lang#23121
Browse files Browse the repository at this point in the history
Until some backwards-compatibility hazards are fixed in rust-lang#23121,
these need to be unstable.

[breaking-change]
  • Loading branch information
brson authored and Manishearth committed Mar 2, 2017
1 parent 2361606 commit e2a433a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -2337,9 +2337,13 @@ considered off, and using the features will result in a compiler error.

The currently implemented features of the reference compiler are:

* `advanced_slice_patterns` - see the [match expressions](#match-expressions)
* `advanced_slice_patterns` - See the [match expressions](#match-expressions)
section for discussion; the exact semantics of
slice patterns are subject to change.
slice patterns are subject to change, so some types
are still unstable.

* `slice_patterns` - OK, actually, slice patterns are just scary and
completely unstable.

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

```
# #![feature(advanced_slice_patterns)]
# #![feature(advanced_slice_patterns, slice_patterns)]
fn is_symmetric(list: &[u32]) -> bool {
match list {
[] | [_] => true,
Expand Down

0 comments on commit e2a433a

Please sign in to comment.