stabilize `#[used]`

closes #40289
This commit is contained in:
Jorge Aparicio 2018-09-09 15:43:28 +02:00
parent df6ba0c4ac
commit 2fb5d5df89
5 changed files with 5 additions and 12 deletions

View File

@ -307,7 +307,7 @@
#![feature(doc_cfg)]
#![feature(doc_masked)]
#![feature(doc_spotlight)]
#![cfg_attr(windows, feature(used))]
#![cfg_attr(all(windows, stage0), feature(used))]
#![feature(doc_alias)]
#![feature(doc_keyword)]
#![feature(panic_info_message)]

View File

@ -349,9 +349,6 @@ declare_features! (
// Allows the `try {...}` expression
(active, try_blocks, "1.29.0", Some(31436), None),
// Used to preserve symbols (see llvm.used)
(active, used, "1.18.0", Some(40289), None),
// Allows module-level inline assembly by way of global_asm!()
(active, global_asm, "1.18.0", Some(35119), None),
@ -674,6 +671,9 @@ declare_features! (
// Allows all literals in attribute lists and values of key-value pairs.
(accepted, attr_literals, "1.30.0", Some(34981), None),
(accepted, panic_handler, "1.30.0", Some(44489), None),
// Used to preserve symbols (see llvm.used)
(accepted, used, "1.29.0", Some(40289), None),
);
// If you change this, please modify src/doc/unstable-book as well. You must
@ -1064,10 +1064,7 @@ pub const BUILTIN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeG
"unwind_attributes",
"#[unwind] is experimental",
cfg_fn!(unwind_attributes))),
("used", Whitelisted, Gated(
Stability::Unstable, "used",
"the `#[used]` attribute is an experimental feature",
cfg_fn!(used))),
("used", Whitelisted, Ungated),
// used in resolve
("prelude_import", Whitelisted, Gated(Stability::Unstable,

View File

@ -9,7 +9,6 @@
// except according to those terms.
#![crate_type = "lib"]
#![feature(used)]
#[used]
static FOO: u32 = 0;

View File

@ -10,7 +10,6 @@
// run-pass
#![deny(dead_code)]
#![feature(used)]
#[used]
static FOO: u32 = 0;

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(used)]
#[used]
static FOO: u32 = 0; // OK