diff options
| author | bors <bors@rust-lang.org> | 2015-07-25 14:50:13 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-07-25 14:50:13 +0000 |
| commit | e333e6a0dc60ac200e3e4c61dc0e536bee6b98af (patch) | |
| tree | 3e3260de94ecb2fa1e12fd351fab7bb3408c128a /src/libsyntax | |
| parent | 04badd6a973d2499731b49365a121dbc4c9c468e (diff) | |
| parent | 0eea0f6e907ff8c8a25a10004bede7b4621b50aa (diff) | |
| download | rust-e333e6a0dc60ac200e3e4c61dc0e536bee6b98af.tar.gz rust-e333e6a0dc60ac200e3e4c61dc0e536bee6b98af.zip | |
Auto merge of #26630 - eefriedman:recursive-static, r=pnkfelix
***Edit: Fixed now.*** I'm pretty sure the way I'm using LLVMReplaceAllUsesWith here is unsafe... but before I figure out how to fix that, I'd like a reality-check: is this actually useful?
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") } } |
