Skip to content

Commit

Permalink
stabilize #[used]
Browse files Browse the repository at this point in the history
closes #40289
  • Loading branch information
japaric committed Sep 9, 2018
1 parent df6ba0c commit 2fb5d5d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/libstd/lib.rs
Expand Up @@ -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)]
Expand Down
11 changes: 4 additions & 7 deletions src/libsyntax/feature_gate.rs
Expand Up @@ -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),

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion src/test/run-make-fulldeps/used/used.rs
Expand Up @@ -9,7 +9,6 @@
// except according to those terms.

#![crate_type = "lib"]
#![feature(used)]

#[used]
static FOO: u32 = 0;
Expand Down
1 change: 0 additions & 1 deletion src/test/ui/run-pass/issues/issue-41628.rs
Expand Up @@ -10,7 +10,6 @@

// run-pass
#![deny(dead_code)]
#![feature(used)]

#[used]
static FOO: u32 = 0;
Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/used.rs
Expand Up @@ -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

Expand Down

0 comments on commit 2fb5d5d

Please sign in to comment.