1 error: `cfg` is not followed by parentheses
2 --> $DIR/cfg-attr-syntax-validation.rs:1:1
4 LL | #[cfg] //~ ERROR `cfg` is not followed by parentheses
5 | ^^^^^^ help: expected syntax is: `cfg(/* predicate */)`
7 error: `cfg` is not followed by parentheses
8 --> $DIR/cfg-attr-syntax-validation.rs:4:1
10 LL | #[cfg = 10] //~ ERROR `cfg` is not followed by parentheses
11 | ^^^^^^^^^^^ help: expected syntax is: `cfg(/* predicate */)`
13 error: `cfg` predicate is not specified
14 --> $DIR/cfg-attr-syntax-validation.rs:7:1
16 LL | #[cfg()] //~ ERROR `cfg` predicate is not specified
19 error: multiple `cfg` predicates are specified
20 --> $DIR/cfg-attr-syntax-validation.rs:10:10
22 LL | #[cfg(a, b)] //~ ERROR multiple `cfg` predicates are specified
25 error: `cfg` predicate key cannot be a literal
26 --> $DIR/cfg-attr-syntax-validation.rs:13:7
28 LL | #[cfg("str")] //~ ERROR `cfg` predicate key cannot be a literal
31 error: `cfg` predicate key must be an identifier
32 --> $DIR/cfg-attr-syntax-validation.rs:16:7
34 LL | #[cfg(a::b)] //~ ERROR `cfg` predicate key must be an identifier
37 error[E0537]: invalid predicate `a`
38 --> $DIR/cfg-attr-syntax-validation.rs:19:7
40 LL | #[cfg(a())] //~ ERROR invalid predicate `a`
43 error: literal in `cfg` predicate value must be a string
44 --> $DIR/cfg-attr-syntax-validation.rs:22:11
46 LL | #[cfg(a = 10)] //~ ERROR literal in `cfg` predicate value must be a string
49 error: `cfg` is not a well-formed meta-item
50 --> $DIR/cfg-attr-syntax-validation.rs:27:9
52 LL | #[cfg(feature = $expr)] //~ ERROR `cfg` is not a well-formed meta-item
53 | ^^^^^^^^^^^^^^^^^^^^^^^ help: expected syntax is: `#[cfg(/* predicate */)]`
55 LL | generate_s9!(concat!("nonexistent"));
56 | ------------------------------------- in this macro invocation
58 error: aborting due to 9 previous errors
60 For more information about this error, try `rustc --explain E0537`.