about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-09-18 11:39:51 +0000
committerbors <bors@rust-lang.org>2018-09-18 11:39:51 +0000
commit79fcc58b24d85743d025fd880fca55748662ed3e (patch)
treee9ef5ee5914fd8a21dec343df158f243d1bddd3c /src/libsyntax
parentf004cae5360c4a3f365c7f7525b4293559201ce2 (diff)
parent3a07d3dbd6cdb2014369935b62b36c64d6c580a6 (diff)
downloadrust-79fcc58b24d85743d025fd880fca55748662ed3e.tar.gz
rust-79fcc58b24d85743d025fd880fca55748662ed3e.zip
Auto merge of #54034 - pnkfelix:issue-15287-bind-by-move-pattern-guards, r=nikomatsakis
Add feature to enable bind by move pattern guards

Implement #15287 as described on https://github.com/rust-lang/rust/issues/15287#issuecomment-404827419
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/feature_gate.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index 67a9601fb12..8ddb7473162 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -515,6 +515,12 @@ declare_features! (
 
     // Self struct constructor  (RFC 2302)
     (active, self_struct_ctor, "1.31.0", Some(51994), None),
+
+    // allow mixing of bind-by-move in patterns and references to
+    // those identifiers in guards, *if* we are using MIR-borrowck
+    // (aka NLL). Essentially this means you need to be on
+    // edition:2018 or later.
+    (active, bind_by_move_pattern_guards, "1.30.0", Some(15287), None),
 );
 
 declare_features! (