about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-03-20 07:42:19 +0000
committerbors <bors@rust-lang.org>2018-03-20 07:42:19 +0000
commitb99172311c640c33f70676df7f75a899a999711c (patch)
tree1accedeedeea201ac4e946d6972631b01aa54035 /src/libsyntax/parse
parent6bfa7d02d6713acd15ead20c199b808e85031f9e (diff)
parent7c90189e1331cea3eac0ab0e8959f664cffba1ae (diff)
downloadrust-b99172311c640c33f70676df7f75a899a999711c.tar.gz
rust-b99172311c640c33f70676df7f75a899a999711c.zip
Auto merge of #48516 - petrochenkov:stabsl, r=nikomatsakis
Stabilize slice patterns without `..`

And merge `feature(advanced_slice_patterns)` into `feature(slice_patterns)`.

The detailed description can be found in https://github.com/rust-lang/rust/issues/48836.

Slice patterns were unstable for long time since before 1.0 due to many bugs in the implementation, now this stabilization is possible primarily due to work of @arielb1 who [wrote the new MIR-based implementation of slice patterns](https://github.com/rust-lang/rust/pull/32202) and @mikhail-m1 who [fixed one remaining class of codegen issues](https://github.com/rust-lang/rust/pull/47926).

Reference PR https://github.com/rust-lang-nursery/reference/pull/259
cc https://github.com/rust-lang/rust/issues/23121
fixes #48836
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index cb5010a638d..6d8975197d5 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -3618,7 +3618,7 @@ impl<'a> Parser<'a> {
                         slice = Some(P(Pat {
                             id: ast::DUMMY_NODE_ID,
                             node: PatKind::Wild,
-                            span: self.span,
+                            span: self.prev_span,
                         }));
                         before_slice = false;
                     }