Skip to content

Commit 54fdf54

Browse files
committed
Add feature gate ui test for cfg(target_has_atomic_equal_alignment).
1 parent af56ad7 commit 54fdf54

File tree

2 files changed

+67
-1
lines changed

2 files changed

+67
-1
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,18 @@ fn main() {
9999
//~^ ERROR `cfg(target_has_atomic_load_store)` is experimental and subject to change
100100
cfg!(target_has_atomic_load_store = "ptr");
101101
//~^ ERROR `cfg(target_has_atomic_load_store)` is experimental and subject to change
102+
cfg!(target_has_atomic_equal_alignment = "8");
103+
//~^ ERROR `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
104+
cfg!(target_has_atomic_equal_alignment = "16");
105+
//~^ ERROR `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
106+
cfg!(target_has_atomic_equal_alignment = "32");
107+
//~^ ERROR `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
108+
cfg!(target_has_atomic_equal_alignment = "64");
109+
//~^ ERROR `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
110+
cfg!(target_has_atomic_equal_alignment = "128");
111+
//~^ ERROR `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
112+
cfg!(target_has_atomic_equal_alignment = "ptr");
113+
//~^ ERROR `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
102114
}
103115

104116
#[macro_export]

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

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,60 @@ LL | cfg!(target_has_atomic_load_store = "ptr");
214214
= note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
215215
= help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
216216

217-
error: aborting due to 24 previous errors
217+
error[E0658]: `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
218+
--> $DIR/feature-gate-cfg-target-has-atomic.rs:102:10
219+
|
220+
LL | cfg!(target_has_atomic_equal_alignment = "8");
221+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
222+
|
223+
= note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
224+
= help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
225+
226+
error[E0658]: `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
227+
--> $DIR/feature-gate-cfg-target-has-atomic.rs:104:10
228+
|
229+
LL | cfg!(target_has_atomic_equal_alignment = "16");
230+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
231+
|
232+
= note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
233+
= help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
234+
235+
error[E0658]: `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
236+
--> $DIR/feature-gate-cfg-target-has-atomic.rs:106:10
237+
|
238+
LL | cfg!(target_has_atomic_equal_alignment = "32");
239+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
240+
|
241+
= note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
242+
= help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
243+
244+
error[E0658]: `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
245+
--> $DIR/feature-gate-cfg-target-has-atomic.rs:108:10
246+
|
247+
LL | cfg!(target_has_atomic_equal_alignment = "64");
248+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
249+
|
250+
= note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
251+
= help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
252+
253+
error[E0658]: `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
254+
--> $DIR/feature-gate-cfg-target-has-atomic.rs:110:10
255+
|
256+
LL | cfg!(target_has_atomic_equal_alignment = "128");
257+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
258+
|
259+
= note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
260+
= help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
261+
262+
error[E0658]: `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
263+
--> $DIR/feature-gate-cfg-target-has-atomic.rs:112:10
264+
|
265+
LL | cfg!(target_has_atomic_equal_alignment = "ptr");
266+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
267+
|
268+
= note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
269+
= help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
270+
271+
error: aborting due to 30 previous errors
218272

219273
For more information about this error, try `rustc --explain E0658`.

0 commit comments

Comments
 (0)