]> git.lizzy.rs Git - rust.git/blob - tests/ui/conditional-compilation/cfg_accessible-input-validation.rs
Rollup merge of #106661 - mjguzik:linux_statx, r=Mark-Simulacrum
[rust.git] / tests / ui / conditional-compilation / cfg_accessible-input-validation.rs
1 #![feature(cfg_accessible)]
2
3 #[cfg_accessible] //~ ERROR malformed `cfg_accessible` attribute input
4 struct S1;
5
6 #[cfg_accessible = "value"] //~ ERROR malformed `cfg_accessible` attribute input
7 struct S2;
8
9 #[cfg_accessible()] //~ ERROR `cfg_accessible` path is not specified
10 struct S3;
11
12 #[cfg_accessible(std, core)] //~ ERROR multiple `cfg_accessible` paths are specified
13 struct S4;
14
15 #[cfg_accessible("std")] //~ ERROR `cfg_accessible` path cannot be a literal
16 struct S5;
17
18 #[cfg_accessible(std = "value")] //~ ERROR `cfg_accessible` path cannot accept arguments
19 struct S6;
20
21 #[cfg_accessible(std(value))] //~ ERROR `cfg_accessible` path cannot accept arguments
22 struct S7;
23
24 fn main() {}