about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2018-09-07 17:52:27 +0200
committerFelix S. Klock II <pnkfelix@pnkfx.org>2018-09-17 13:46:50 +0200
commit7d844e871c2b6d3c86adff53792fc36fdd338eb2 (patch)
treeb0a1c602705c20ee6689f2c4a6051e1666ccfcea /src/libsyntax
parentf1aefb48d2ec7ac38a66c964396a5aec729b7a28 (diff)
downloadrust-7d844e871c2b6d3c86adff53792fc36fdd338eb2.tar.gz
rust-7d844e871c2b6d3c86adff53792fc36fdd338eb2.zip
Add `feature(bind_by_move_pattern_guards)`.
Note it requires MIR-borrowck to be enabled to actually do anything.

Note also that it implicitly turns off our AST-based check for
mutation in guards.
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 7266d807d3b..922e773f144 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! (