summary refs log tree commit diff
path: root/src/test/ui/cfg-attr-syntax-validation.stderr
blob: 9c8a05d1092d8f6e2a3576f00a6aa138ca1ddb41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
error: `cfg` is not followed by parentheses
  --> $DIR/cfg-attr-syntax-validation.rs:11:1
   |
LL | #[cfg] //~ ERROR `cfg` is not followed by parentheses
   | ^^^^^^ help: expected syntax is: `cfg(/* predicate */)`

error: `cfg` is not followed by parentheses
  --> $DIR/cfg-attr-syntax-validation.rs:14:1
   |
LL | #[cfg = 10] //~ ERROR `cfg` is not followed by parentheses
   | ^^^^^^^^^^^ help: expected syntax is: `cfg(/* predicate */)`

error: `cfg` predicate is not specified
  --> $DIR/cfg-attr-syntax-validation.rs:17:1
   |
LL | #[cfg()] //~ ERROR `cfg` predicate is not specified
   | ^^^^^^^^

error: multiple `cfg` predicates are specified
  --> $DIR/cfg-attr-syntax-validation.rs:20:10
   |
LL | #[cfg(a, b)] //~ ERROR multiple `cfg` predicates are specified
   |          ^

error: `cfg` predicate key cannot be a literal
  --> $DIR/cfg-attr-syntax-validation.rs:23:7
   |
LL | #[cfg("str")] //~ ERROR `cfg` predicate key cannot be a literal
   |       ^^^^^

error: `cfg` predicate key must be an identifier
  --> $DIR/cfg-attr-syntax-validation.rs:26:7
   |
LL | #[cfg(a::b)] //~ ERROR `cfg` predicate key must be an identifier
   |       ^^^^

error[E0537]: invalid predicate `a`
  --> $DIR/cfg-attr-syntax-validation.rs:29:7
   |
LL | #[cfg(a())] //~ ERROR invalid predicate `a`
   |       ^^^

error: literal in `cfg` predicate value must be a string
  --> $DIR/cfg-attr-syntax-validation.rs:32:11
   |
LL | #[cfg(a = 10)] //~ ERROR literal in `cfg` predicate value must be a string
   |           ^^

error: `cfg` is not a well-formed meta-item
  --> $DIR/cfg-attr-syntax-validation.rs:37:9
   |
LL |         #[cfg(feature = $expr)] //~ ERROR `cfg` is not a well-formed meta-item
   |         ^^^^^^^^^^^^^^^^^^^^^^^ help: expected syntax is: `#[cfg(/* predicate */)]`
...
LL | generate_s9!(concat!("nonexistent"));
   | ------------------------------------- in this macro invocation

error: aborting due to 9 previous errors

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