summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorEduard-Mihai Burtescu <edy.burt@gmail.com>2017-02-25 14:13:33 +0200
committerGitHub <noreply@github.com>2017-02-25 14:13:33 +0200
commitc3075f3d96c964be33d3eb15c0ad05d71a01bbe0 (patch)
tree82290649afc902c793071ff839cfff6934b8aaf0 /src/libsyntax
parent32af4ceb04d2bf479052ceadf51c8c8c82297f6a (diff)
parent77f131da1afcaf5582259e7a15048105fea9591d (diff)
downloadrust-c3075f3d96c964be33d3eb15c0ad05d71a01bbe0.tar.gz
rust-c3075f3d96c964be33d3eb15c0ad05d71a01bbe0.zip
Rollup merge of #40025 - est31:master, r=eddyb
Implement non-capturing closure to fn coercion

Implements non capturing closure coercion ([RFC 1558](https://github.com/rust-lang/rfcs/blob/master/text/1558-closure-to-fn-coercion.md)).

cc tracking issue #39817
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/feature_gate.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index b7be084fa0b..b66b08f8cd8 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -328,6 +328,10 @@ declare_features! (
 
     // Used to identify crates that contain sanitizer runtimes
     // rustc internal
+    (active, closure_to_fn_coercion, "1.17.0", Some(39817)),
+
+    // Used to identify crates that contain sanitizer runtimes
+    // rustc internal
     (active, sanitizer_runtime, "1.17.0", None),
 );
 
@@ -982,6 +986,9 @@ pub const EXPLAIN_DERIVE_UNDERSCORE: &'static str =
 pub const EXPLAIN_PLACEMENT_IN: &'static str =
     "placement-in expression syntax is experimental and subject to change.";
 
+pub const CLOSURE_TO_FN_COERCION: &'static str =
+    "non-capturing closure to fn coercion is experimental";
+
 struct PostExpansionVisitor<'a> {
     context: &'a Context<'a>,
 }