Skip to content

Commit 972bba7

Browse files
author
Jethro Beekman
committed
Stabilize cfg_target_vendor, #29718
1 parent 6080318 commit 972bba7

File tree

8 files changed

+6
-56
lines changed

8 files changed

+6
-56
lines changed

src/libpanic_abort/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#![panic_runtime]
1313
#![allow(unused_features)]
1414

15-
#![feature(cfg_target_vendor)]
15+
#![cfg_attr(stage0, feature(cfg_target_vendor))]
1616
#![feature(core_intrinsics)]
1717
#![feature(libc)]
1818
#![feature(nll)]

src/libstd/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@
238238
#![feature(c_variadic)]
239239
#![feature(cfg_target_has_atomic)]
240240
#![feature(cfg_target_thread_local)]
241-
#![feature(cfg_target_vendor)]
241+
#![cfg_attr(stage0, feature(cfg_target_vendor))]
242242
#![feature(char_error_internals)]
243243
#![feature(compiler_builtins_lib)]
244244
#![feature(concat_idents)]

src/libsyntax/feature_gate.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,6 @@ declare_features! (
244244
// rustc internal
245245
(active, omit_gdb_pretty_printer_section, "1.5.0", None, None),
246246

247-
// Allows `cfg(target_vendor = "...")`.
248-
(active, cfg_target_vendor, "1.5.0", Some(29718), None),
249-
250247
// Allows attributes on expressions and non-item statements.
251248
(active, stmt_expr_attributes, "1.6.0", Some(15701), None),
252249

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

691690
// If you change this, please modify `src/doc/unstable-book` as well. You must
@@ -1181,7 +1180,6 @@ pub const BUILTIN_ATTRIBUTES: &[(&str, AttributeType, AttributeGate)] = &[
11811180
// cfg(...)'s that are feature gated
11821181
const GATED_CFGS: &[(&str, &str, fn(&Features) -> bool)] = &[
11831182
// (name in cfg, feature, function to check if the feature is enabled)
1184-
("target_vendor", "cfg_target_vendor", cfg_fn!(cfg_target_vendor)),
11851183
("target_thread_local", "cfg_target_thread_local", cfg_fn!(cfg_target_thread_local)),
11861184
("target_has_atomic", "cfg_target_has_atomic", cfg_fn!(cfg_target_has_atomic)),
11871185
("rustdoc", "doc_cfg", cfg_fn!(doc_cfg)),

src/libtest/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
2424
html_root_url = "https://doc.rust-lang.org/nightly/", test(attr(deny(warnings))))]
2525
#![feature(asm)]
26-
#![feature(cfg_target_vendor)]
26+
#![cfg_attr(stage0, feature(cfg_target_vendor))]
2727
#![feature(fnbox)]
2828
#![cfg_attr(any(unix, target_os = "cloudabi"), feature(libc))]
2929
#![feature(nll)]

src/libunwind/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![no_std]
22
#![unstable(feature = "panic_unwind", issue = "32837")]
33

4-
#![feature(cfg_target_vendor)]
4+
#![cfg_attr(stage0, feature(cfg_target_vendor))]
55
#![feature(link_cfg)]
66
#![feature(nll)]
77
#![feature(staged_api)]

src/test/run-pass/cfg/cfg-target-vendor.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
// run-pass
2-
#![feature(cfg_target_vendor)]
3-
42
#[cfg(target_vendor = "unknown")]
53
pub fn main() {
64
}

src/test/ui/feature-gates/feature-gate-cfg-target-vendor.rs

-11
This file was deleted.

src/test/ui/feature-gates/feature-gate-cfg-target-vendor.stderr

-35
This file was deleted.

0 commit comments

Comments
 (0)