Add feature gate ui test for cfg(target_has_atomic_equal_alignment).

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

View File

@ -99,6 +99,18 @@ fn main() {
//~^ 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
cfg!(target_has_atomic_equal_alignment = "8");
//~^ ERROR `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
cfg!(target_has_atomic_equal_alignment = "16");
//~^ ERROR `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
cfg!(target_has_atomic_equal_alignment = "32");
//~^ ERROR `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
cfg!(target_has_atomic_equal_alignment = "64");
//~^ ERROR `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
cfg!(target_has_atomic_equal_alignment = "128");
//~^ ERROR `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
cfg!(target_has_atomic_equal_alignment = "ptr");
//~^ ERROR `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
}
#[macro_export]

View File

@ -214,6 +214,60 @@ 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
error[E0658]: `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
--> $DIR/feature-gate-cfg-target-has-atomic.rs:102:10
|
LL | cfg!(target_has_atomic_equal_alignment = "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_equal_alignment)` is experimental and subject to change
--> $DIR/feature-gate-cfg-target-has-atomic.rs:104:10
|
LL | cfg!(target_has_atomic_equal_alignment = "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_equal_alignment)` is experimental and subject to change
--> $DIR/feature-gate-cfg-target-has-atomic.rs:106:10
|
LL | cfg!(target_has_atomic_equal_alignment = "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_equal_alignment)` is experimental and subject to change
--> $DIR/feature-gate-cfg-target-has-atomic.rs:108:10
|
LL | cfg!(target_has_atomic_equal_alignment = "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_equal_alignment)` is experimental and subject to change
--> $DIR/feature-gate-cfg-target-has-atomic.rs:110:10
|
LL | cfg!(target_has_atomic_equal_alignment = "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_equal_alignment)` is experimental and subject to change
--> $DIR/feature-gate-cfg-target-has-atomic.rs:112:10
|
LL | cfg!(target_has_atomic_equal_alignment = "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 30 previous errors
For more information about this error, try `rustc --explain E0658`.