Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stabilize cfg_target_vendor #57465

Merged
merged 2 commits into from
Jan 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: 2 additions & 0 deletions src/librustdoc/clean/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ impl<'a> fmt::Display for Html<'a> {
"pc" => "PC",
"rumprun" => "Rumprun",
"sun" => "Sun",
"fortanix" => "Fortanix",
_ => ""
},
("target_env", Some(env)) => match &*env.as_str() {
Expand All @@ -378,6 +379,7 @@ impl<'a> fmt::Display for Html<'a> {
"musl" => "musl",
"newlib" => "Newlib",
"uclibc" => "uClibc",
"sgx" => "SGX",
_ => "",
},
("target_endian", Some(endian)) => return write!(fmt, "{}-endian", endian),
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),
Centril marked this conversation as resolved.
Show resolved Hide resolved
);

// 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.