Stabilize `cfg_target_vendor`, #29718
This commit is contained in:
parent
6080318883
commit
972bba7071
|
@ -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)]
|
||||
|
|
|
@ -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)]
|
||||
|
|
|
@ -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),
|
||||
|
||||
|
@ -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
|
||||
|
@ -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)),
|
||||
|
|
|
@ -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)]
|
||||
|
|
|
@ -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)]
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
// run-pass
|
||||
#![feature(cfg_target_vendor)]
|
||||
|
||||
#[cfg(target_vendor = "unknown")]
|
||||
pub fn main() {
|
||||
}
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
#[cfg(target_vendor = "x")] //~ ERROR `cfg(target_vendor)` is experimental
|
||||
#[cfg_attr(target_vendor = "x", x)] //~ ERROR `cfg(target_vendor)` is experimental
|
||||
struct Foo(u64, u64);
|
||||
|
||||
#[cfg(not(any(all(target_vendor = "x"))))] //~ ERROR `cfg(target_vendor)` is experimental
|
||||
fn foo() {}
|
||||
|
||||
fn main() {
|
||||
cfg!(target_vendor = "x");
|
||||
//~^ ERROR `cfg(target_vendor)` is experimental and subject to change
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
error[E0658]: `cfg(target_vendor)` is experimental and subject to change (see issue #29718)
|
||||
--> $DIR/feature-gate-cfg-target-vendor.rs:2:12
|
||||
|
|
||||
LL | #[cfg_attr(target_vendor = "x", x)] //~ ERROR `cfg(target_vendor)` is experimental
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: add #![feature(cfg_target_vendor)] to the crate attributes to enable
|
||||
|
||||
error[E0658]: `cfg(target_vendor)` is experimental and subject to change (see issue #29718)
|
||||
--> $DIR/feature-gate-cfg-target-vendor.rs:1:7
|
||||
|
|
||||
LL | #[cfg(target_vendor = "x")] //~ ERROR `cfg(target_vendor)` is experimental
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: add #![feature(cfg_target_vendor)] to the crate attributes to enable
|
||||
|
||||
error[E0658]: `cfg(target_vendor)` is experimental and subject to change (see issue #29718)
|
||||
--> $DIR/feature-gate-cfg-target-vendor.rs:5:19
|
||||
|
|
||||
LL | #[cfg(not(any(all(target_vendor = "x"))))] //~ ERROR `cfg(target_vendor)` is experimental
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: add #![feature(cfg_target_vendor)] to the crate attributes to enable
|
||||
|
||||
error[E0658]: `cfg(target_vendor)` is experimental and subject to change (see issue #29718)
|
||||
--> $DIR/feature-gate-cfg-target-vendor.rs:9:10
|
||||
|
|
||||
LL | cfg!(target_vendor = "x");
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: add #![feature(cfg_target_vendor)] to the crate attributes to enable
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0658`.
|
Loading…
Reference in New Issue