Skip to content

Commit

Permalink
Stabilize cfg_target_vendor, #29718
Browse files Browse the repository at this point in the history
  • Loading branch information
Jethro Beekman committed Jan 14, 2019
1 parent 6080318 commit 972bba7
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 56 deletions.
2 changes: 1 addition & 1 deletion src/libpanic_abort/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#![panic_runtime]
#![allow(unused_features)]

#![feature(cfg_target_vendor)]
#![cfg_attr(stage0, feature(cfg_target_vendor))]
#![feature(core_intrinsics)]
#![feature(libc)]
#![feature(nll)]
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
#![feature(c_variadic)]
#![feature(cfg_target_has_atomic)]
#![feature(cfg_target_thread_local)]
#![feature(cfg_target_vendor)]
#![cfg_attr(stage0, feature(cfg_target_vendor))]
#![feature(char_error_internals)]
#![feature(compiler_builtins_lib)]
#![feature(concat_idents)]
Expand Down
6 changes: 2 additions & 4 deletions src/libsyntax/feature_gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,6 @@ declare_features! (
// rustc internal
(active, omit_gdb_pretty_printer_section, "1.5.0", None, None),

// Allows `cfg(target_vendor = "...")`.
(active, cfg_target_vendor, "1.5.0", Some(29718), None),

// Allows attributes on expressions and non-item statements.
(active, stmt_expr_attributes, "1.6.0", Some(15701), None),

Expand Down Expand Up @@ -686,6 +683,8 @@ declare_features! (
(accepted, if_while_or_patterns, "1.33.0", Some(48215), None),
// Allows `use x::y;` to search `x` in the current scope.
(accepted, uniform_paths, "1.32.0", Some(53130), None),
// Allows `cfg(target_vendor = "...")`.
(accepted, cfg_target_vendor, "1.33.0", Some(29718), None),
);

// If you change this, please modify `src/doc/unstable-book` as well. You must
Expand Down Expand Up @@ -1181,7 +1180,6 @@ pub const BUILTIN_ATTRIBUTES: &[(&str, AttributeType, AttributeGate)] = &[
// cfg(...)'s that are feature gated
const GATED_CFGS: &[(&str, &str, fn(&Features) -> bool)] = &[
// (name in cfg, feature, function to check if the feature is enabled)
("target_vendor", "cfg_target_vendor", cfg_fn!(cfg_target_vendor)),
("target_thread_local", "cfg_target_thread_local", cfg_fn!(cfg_target_thread_local)),
("target_has_atomic", "cfg_target_has_atomic", cfg_fn!(cfg_target_has_atomic)),
("rustdoc", "doc_cfg", cfg_fn!(doc_cfg)),
Expand Down
2 changes: 1 addition & 1 deletion src/libtest/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
html_root_url = "https://doc.rust-lang.org/nightly/", test(attr(deny(warnings))))]
#![feature(asm)]
#![feature(cfg_target_vendor)]
#![cfg_attr(stage0, feature(cfg_target_vendor))]
#![feature(fnbox)]
#![cfg_attr(any(unix, target_os = "cloudabi"), feature(libc))]
#![feature(nll)]
Expand Down
2 changes: 1 addition & 1 deletion src/libunwind/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![no_std]
#![unstable(feature = "panic_unwind", issue = "32837")]

#![feature(cfg_target_vendor)]
#![cfg_attr(stage0, feature(cfg_target_vendor))]
#![feature(link_cfg)]
#![feature(nll)]
#![feature(staged_api)]
Expand Down
2 changes: 0 additions & 2 deletions src/test/run-pass/cfg/cfg-target-vendor.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// run-pass
#![feature(cfg_target_vendor)]

#[cfg(target_vendor = "unknown")]
pub fn main() {
}
Expand Down
11 changes: 0 additions & 11 deletions src/test/ui/feature-gates/feature-gate-cfg-target-vendor.rs

This file was deleted.

35 changes: 0 additions & 35 deletions src/test/ui/feature-gates/feature-gate-cfg-target-vendor.stderr

This file was deleted.

0 comments on commit 972bba7

Please sign in to comment.