]> git.lizzy.rs Git - rust.git/blob - src/test/ui/cfg-attr-syntax-validation.stderr
Auto merge of #54720 - davidtwco:issue-51191, r=nikomatsakis
[rust.git] / src / test / ui / cfg-attr-syntax-validation.stderr
1 error: `cfg` is not followed by parentheses
2   --> $DIR/cfg-attr-syntax-validation.rs:1:1
3    |
4 LL | #[cfg] //~ ERROR `cfg` is not followed by parentheses
5    | ^^^^^^ help: expected syntax is: `cfg(/* predicate */)`
6
7 error: `cfg` is not followed by parentheses
8   --> $DIR/cfg-attr-syntax-validation.rs:4:1
9    |
10 LL | #[cfg = 10] //~ ERROR `cfg` is not followed by parentheses
11    | ^^^^^^^^^^^ help: expected syntax is: `cfg(/* predicate */)`
12
13 error: `cfg` predicate is not specified
14   --> $DIR/cfg-attr-syntax-validation.rs:7:1
15    |
16 LL | #[cfg()] //~ ERROR `cfg` predicate is not specified
17    | ^^^^^^^^
18
19 error: multiple `cfg` predicates are specified
20   --> $DIR/cfg-attr-syntax-validation.rs:10:10
21    |
22 LL | #[cfg(a, b)] //~ ERROR multiple `cfg` predicates are specified
23    |          ^
24
25 error: `cfg` predicate key cannot be a literal
26   --> $DIR/cfg-attr-syntax-validation.rs:13:7
27    |
28 LL | #[cfg("str")] //~ ERROR `cfg` predicate key cannot be a literal
29    |       ^^^^^
30
31 error: `cfg` predicate key must be an identifier
32   --> $DIR/cfg-attr-syntax-validation.rs:16:7
33    |
34 LL | #[cfg(a::b)] //~ ERROR `cfg` predicate key must be an identifier
35    |       ^^^^
36
37 error[E0537]: invalid predicate `a`
38   --> $DIR/cfg-attr-syntax-validation.rs:19:7
39    |
40 LL | #[cfg(a())] //~ ERROR invalid predicate `a`
41    |       ^^^
42
43 error: literal in `cfg` predicate value must be a string
44   --> $DIR/cfg-attr-syntax-validation.rs:22:11
45    |
46 LL | #[cfg(a = 10)] //~ ERROR literal in `cfg` predicate value must be a string
47    |           ^^
48
49 error: `cfg` is not a well-formed meta-item
50   --> $DIR/cfg-attr-syntax-validation.rs:27:9
51    |
52 LL |         #[cfg(feature = $expr)] //~ ERROR `cfg` is not a well-formed meta-item
53    |         ^^^^^^^^^^^^^^^^^^^^^^^ help: expected syntax is: `#[cfg(/* predicate */)]`
54 ...
55 LL | generate_s9!(concat!("nonexistent"));
56    | ------------------------------------- in this macro invocation
57
58 error: aborting due to 9 previous errors
59
60 For more information about this error, try `rustc --explain E0537`.