diff options
| author | bors <bors@rust-lang.org> | 2019-12-23 21:49:44 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-12-23 21:49:44 +0000 |
| commit | a4cd03dee2b57216b5c95084a0b46de130946ad7 (patch) | |
| tree | f7b088dc1993e10a614283fbecc7a7bef4d6e552 /src/librustc_parse/parser | |
| parent | 9ae6cedb8d1e37469be1434642a3e403fce50a03 (diff) | |
| parent | acfe58272cb188e2da69d2bf1285bf2d954de9a2 (diff) | |
| download | rust-a4cd03dee2b57216b5c95084a0b46de130946ad7.tar.gz rust-a4cd03dee2b57216b5c95084a0b46de130946ad7.zip | |
Auto merge of #66296 - Centril:bindings_after_at-init, r=pnkfelix
Initial implementation of `#![feature(bindings_after_at)]` Following up on #16053, under the gate `#![feature(bindings_after_at)]`, `x @ Some(y)` is allowed subject to restrictions necessary for soundness. The implementation and test suite should be fairly complete now. One aspect that is not covered is the interaction with nested `#![feature(or_patterns)]`. This is not possible to test at the moment in a good way because that feature has not progressed sufficiently and has fatal errors in MIR building. We should make sure to add such tests before we stabilize both features (but shipping one of them is fine). r? @pnkfelix cc @nikomatsakis @matthewjasper @pcwalton cc https://github.com/rust-lang/rust/issues/65490
Diffstat (limited to 'src/librustc_parse/parser')
| -rw-r--r-- | src/librustc_parse/parser/pat.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/librustc_parse/parser/pat.rs b/src/librustc_parse/parser/pat.rs index 9b5bf7e2378..1540e6d7c05 100644 --- a/src/librustc_parse/parser/pat.rs +++ b/src/librustc_parse/parser/pat.rs @@ -406,6 +406,7 @@ impl<'a> Parser<'a> { if let PatKind::Ident(_, _, ref mut sub @ None) = rhs.kind { // The user inverted the order, so help them fix that. let mut applicability = Applicability::MachineApplicable; + // FIXME(bindings_after_at): Remove this code when stabilizing the feature. lhs.walk(&mut |p| match p.kind { // `check_match` is unhappy if the subpattern has a binding anywhere. PatKind::Ident(..) => { |
