Add feature gate ui test for cfg(target_has_atomic_load_store).

This commit is contained in:
Mara Bos 2020-09-20 13:03:12 +02:00
parent 9e3f94dabc
commit af56ad7633
2 changed files with 67 additions and 1 deletions

View File

@ -87,6 +87,18 @@ fn main() {
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change
cfg!(target_has_atomic = "ptr");
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change
cfg!(target_has_atomic_load_store = "8");
//~^ ERROR `cfg(target_has_atomic_load_store)` is experimental and subject to change
cfg!(target_has_atomic_load_store = "16");
//~^ ERROR `cfg(target_has_atomic_load_store)` is experimental and subject to change
cfg!(target_has_atomic_load_store = "32");
//~^ ERROR `cfg(target_has_atomic_load_store)` is experimental and subject to change
cfg!(target_has_atomic_load_store = "64");
//~^ ERROR `cfg(target_has_atomic_load_store)` is experimental and subject to change
cfg!(target_has_atomic_load_store = "128");
//~^ ERROR `cfg(target_has_atomic_load_store)` is experimental and subject to change
cfg!(target_has_atomic_load_store = "ptr");
//~^ ERROR `cfg(target_has_atomic_load_store)` is experimental and subject to change
}
#[macro_export]

View File

@ -160,6 +160,60 @@ LL | cfg!(target_has_atomic = "ptr");
= note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
= help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
error: aborting due to 18 previous errors
error[E0658]: `cfg(target_has_atomic_load_store)` is experimental and subject to change
--> $DIR/feature-gate-cfg-target-has-atomic.rs:90:10
|
LL | cfg!(target_has_atomic_load_store = "8");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
= help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
error[E0658]: `cfg(target_has_atomic_load_store)` is experimental and subject to change
--> $DIR/feature-gate-cfg-target-has-atomic.rs:92:10
|
LL | cfg!(target_has_atomic_load_store = "16");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
= help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
error[E0658]: `cfg(target_has_atomic_load_store)` is experimental and subject to change
--> $DIR/feature-gate-cfg-target-has-atomic.rs:94:10
|
LL | cfg!(target_has_atomic_load_store = "32");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
= help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
error[E0658]: `cfg(target_has_atomic_load_store)` is experimental and subject to change
--> $DIR/feature-gate-cfg-target-has-atomic.rs:96:10
|
LL | cfg!(target_has_atomic_load_store = "64");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
= help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
error[E0658]: `cfg(target_has_atomic_load_store)` is experimental and subject to change
--> $DIR/feature-gate-cfg-target-has-atomic.rs:98:10
|
LL | cfg!(target_has_atomic_load_store = "128");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
= help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
error[E0658]: `cfg(target_has_atomic_load_store)` is experimental and subject to change
--> $DIR/feature-gate-cfg-target-has-atomic.rs:100:10
|
LL | cfg!(target_has_atomic_load_store = "ptr");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
= help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
error: aborting due to 24 previous errors
For more information about this error, try `rustc --explain E0658`.