diff options
| author | Eli Friedman <eli.friedman@gmail.com> | 2015-07-02 14:07:42 -0700 |
|---|---|---|
| committer | Eli Friedman <eli.friedman@gmail.com> | 2015-07-24 19:17:58 -0700 |
| commit | 742e1242d9b568edfef51d968f4f81787534e475 (patch) | |
| tree | 9791055aa9161edbe9b9384d74d3bfcd0ef0f211 /src/libsyntax | |
| parent | 8ebf95257bfc9093cb25dba209ded303ec167e5f (diff) | |
| download | rust-742e1242d9b568edfef51d968f4f81787534e475.tar.gz rust-742e1242d9b568edfef51d968f4f81787534e475.zip | |
Add static_recursion feature gate.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 8c6855036f6..ee895fb1a96 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -160,6 +160,9 @@ const KNOWN_FEATURES: &'static [(&'static str, &'static str, Status)] = &[ // Allows using #[prelude_import] on glob `use` items. ("prelude_import", "1.2.0", Active), + + // Allows the definition recursive static items. + ("static_recursion", "1.3.0", Active), ]; // (changing above list without updating src/doc/reference.md makes @cmr sad) @@ -338,6 +341,7 @@ pub struct Features { /// #![feature] attrs for non-language (library) features pub declared_lib_features: Vec<(InternedString, Span)>, pub const_fn: bool, + pub static_recursion: bool } impl Features { @@ -362,6 +366,7 @@ impl Features { declared_stable_lang_features: Vec::new(), declared_lib_features: Vec::new(), const_fn: false, + static_recursion: false } } } @@ -859,6 +864,7 @@ fn check_crate_inner<F>(cm: &CodeMap, span_handler: &SpanHandler, declared_stable_lang_features: accepted_features, declared_lib_features: unknown_features, const_fn: cx.has_feature("const_fn"), + static_recursion: cx.has_feature("static_recursion") } } |
