From 7d844e871c2b6d3c86adff53792fc36fdd338eb2 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Fri, 7 Sep 2018 17:52:27 +0200 Subject: 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. --- src/libsyntax/feature_gate.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/libsyntax') 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! ( -- cgit 1.4.1-3-g733a5