fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
2.4 KiB82 linesraw
1error: `cfg` is not followed by parentheses
2  --> $DIR/cfg-attr-syntax-validation.rs:1:1
3   |
4LL | #[cfg]
5   | ^^^^^^ help: expected syntax is: `cfg(/* predicate */)`
6
7error: `cfg` is not followed by parentheses
8  --> $DIR/cfg-attr-syntax-validation.rs:4:1
9   |
10LL | #[cfg = 10]
11   | ^^^^^^^^^^^ help: expected syntax is: `cfg(/* predicate */)`
12
13error: `cfg` predicate is not specified
14  --> $DIR/cfg-attr-syntax-validation.rs:7:1
15   |
16LL | #[cfg()]
17   | ^^^^^^^^ help: expected syntax is: `cfg(/* predicate */)`
18
19error: multiple `cfg` predicates are specified
20  --> $DIR/cfg-attr-syntax-validation.rs:10:10
21   |
22LL | #[cfg(a, b)]
23   |          ^
24
25error: `cfg` predicate key cannot be a literal
26  --> $DIR/cfg-attr-syntax-validation.rs:13:7
27   |
28LL | #[cfg("str")]
29   |       ^^^^^
30
31error: `cfg` predicate key must be an identifier
32  --> $DIR/cfg-attr-syntax-validation.rs:16:7
33   |
34LL | #[cfg(a::b)]
35   |       ^^^^
36
37error[E0537]: invalid predicate `a`
38  --> $DIR/cfg-attr-syntax-validation.rs:19:7
39   |
40LL | #[cfg(a())]
41   |       ^^^
42
43error[E0565]: literal in `cfg` predicate value must be a string
44  --> $DIR/cfg-attr-syntax-validation.rs:22:11
45   |
46LL | #[cfg(a = 10)]
47   |           ^^
48
49error[E0565]: literal in `cfg` predicate value must be a string
50  --> $DIR/cfg-attr-syntax-validation.rs:25:11
51   |
52LL | #[cfg(a = b"hi")]
53   |           -^^^^
54   |           |
55   |           help: consider removing the prefix
56
57error: expected unsuffixed literal or identifier, found `concat!("nonexistent")`
58  --> $DIR/cfg-attr-syntax-validation.rs:30:25
59   |
60LL |         #[cfg(feature = $expr)]
61   |                         ^^^^^
62...
63LL | generate_s10!(concat!("nonexistent"));
64   | ------------------------------------- in this macro invocation
65   |
66   = note: this error originates in the macro `generate_s10` (in Nightly builds, run with -Z macro-backtrace for more info)
67
68error: expected unsuffixed literal or identifier, found `concat!("nonexistent")`
69  --> $DIR/cfg-attr-syntax-validation.rs:30:25
70   |
71LL |         #[cfg(feature = $expr)]
72   |                         ^^^^^
73...
74LL | generate_s10!(concat!("nonexistent"));
75   | ------------------------------------- in this macro invocation
76   |
77   = note: this error originates in the macro `generate_s10` (in Nightly builds, run with -Z macro-backtrace for more info)
78
79error: aborting due to 11 previous errors
80
81Some errors have detailed explanations: E0537, E0565.
82For more information about an error, try `rustc --explain E0537`.