summary refs log tree commit diff
path: root/src/test/ui/conditional-compilation/cfg-attr-syntax-validation.stderr
blob: bcf13ead2f4f7eb7783d11394bb30e4396aadb8a (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
61
62
63
64
65
66
67
error: `cfg` is not followed by parentheses
  --> $DIR/cfg-attr-syntax-validation.rs:1: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:4: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:7:1
   |
LL | #[cfg()] //~ ERROR `cfg` predicate is not specified
   | ^^^^^^^^

error: multiple `cfg` predicates are specified
  --> $DIR/cfg-attr-syntax-validation.rs:10: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:13: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:16:7
   |
LL | #[cfg(a::b)] //~ ERROR `cfg` predicate key must be an identifier
   |       ^^^^

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

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

error[E0565]: literal in `cfg` predicate value must be a string
  --> $DIR/cfg-attr-syntax-validation.rs:25:11
   |
LL | #[cfg(a = b"hi")]  //~ ERROR literal in `cfg` predicate value must be a string
   |           ^^^^^ help: consider removing the prefix: `"hi"`

error: expected unsuffixed literal or identifier, found concat!("nonexistent")
  --> $DIR/cfg-attr-syntax-validation.rs:30:15
   |
LL |         #[cfg(feature = $expr)]
   |               ^^^^^^^
...
LL | generate_s10!(concat!("nonexistent"));
   | -------------------------------------- in this macro invocation

error: aborting due to 10 previous errors

Some errors occurred: E0537, E0565.
For more information about an error, try `rustc --explain E0537`.