diff options
| author | bors <bors@rust-lang.org> | 2015-11-26 10:22:37 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-11-26 10:22:37 +0000 |
| commit | 6d88afe4775436d45ec3050ee5c1488e68afe9e2 (patch) | |
| tree | 38da8eb011aa1fa46f4e819512c8809346bfa34f /src/libsyntax | |
| parent | 1805bba399805d8fd8e85e23c31a0580f21533cb (diff) | |
| parent | 4b8078424ebe6327ed80113063985014470afabb (diff) | |
| download | rust-6d88afe4775436d45ec3050ee5c1488e68afe9e2.tar.gz rust-6d88afe4775436d45ec3050ee5c1488e68afe9e2.zip | |
Auto merge of #30015 - petrochenkov:staged, r=brson
Closes https://github.com/rust-lang/rust/issues/30008 `#[stable]`, `#[unstable]` and `#[rustc_deprecated]` are now guarded by `#[feature(staged_api)]` r? @brson
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 5 | ||||
| -rw-r--r-- | src/libsyntax/lib.rs | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 1663bdca51f..b450331d440 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -277,8 +277,6 @@ pub const KNOWN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeGat // Not used any more, but we can't feature gate it ("no_stack_check", Normal, Ungated), - ("staged_api", CrateLevel, Gated("staged_api", - "staged_api is for use by rustc only")), ("plugin", CrateLevel, Gated("plugin", "compiler plugins are experimental \ and possibly buggy")), @@ -501,6 +499,7 @@ pub struct Features { pub cfg_target_vendor: bool, pub augmented_assignments: bool, pub braced_empty_structs: bool, + pub staged_api: bool, } impl Features { @@ -532,6 +531,7 @@ impl Features { cfg_target_vendor: false, augmented_assignments: false, braced_empty_structs: false, + staged_api: false, } } } @@ -1104,6 +1104,7 @@ fn check_crate_inner<F>(cm: &CodeMap, span_handler: &SpanHandler, cfg_target_vendor: cx.has_feature("cfg_target_vendor"), augmented_assignments: cx.has_feature("augmented_assignments"), braced_empty_structs: cx.has_feature("braced_empty_structs"), + staged_api: cx.has_feature("staged_api"), } } diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index 59cc380b0ec..475408472ee 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -18,7 +18,7 @@ #![cfg_attr(stage0, feature(custom_attribute))] #![crate_name = "syntax"] #![unstable(feature = "rustc_private", issue = "27812")] -#![staged_api] +#![cfg_attr(stage0, staged_api)] #![crate_type = "dylib"] #![crate_type = "rlib"] #