2018-09-02 00:13:22 +03:00
|
|
|
error: `cfg` is not followed by parentheses
|
|
|
|
--> $DIR/cfg-attr-syntax-validation.rs:1:1
|
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | #[cfg]
|
2018-09-02 00:13:22 +03:00
|
|
|
| ^^^^^^ help: expected syntax is: `cfg(/* predicate */)`
|
|
|
|
|
|
|
|
error: `cfg` is not followed by parentheses
|
|
|
|
--> $DIR/cfg-attr-syntax-validation.rs:4:1
|
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | #[cfg = 10]
|
2018-09-02 00:13:22 +03:00
|
|
|
| ^^^^^^^^^^^ help: expected syntax is: `cfg(/* predicate */)`
|
|
|
|
|
|
|
|
error: `cfg` predicate is not specified
|
|
|
|
--> $DIR/cfg-attr-syntax-validation.rs:7:1
|
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | #[cfg()]
|
2022-11-15 14:24:33 +01:00
|
|
|
| ^^^^^^^^ help: expected syntax is: `cfg(/* predicate */)`
|
2018-09-02 00:13:22 +03:00
|
|
|
|
|
|
|
error: multiple `cfg` predicates are specified
|
|
|
|
--> $DIR/cfg-attr-syntax-validation.rs:10:10
|
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | #[cfg(a, b)]
|
2018-09-02 00:13:22 +03:00
|
|
|
| ^
|
|
|
|
|
|
|
|
error: `cfg` predicate key cannot be a literal
|
|
|
|
--> $DIR/cfg-attr-syntax-validation.rs:13:7
|
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | #[cfg("str")]
|
2018-09-02 00:13:22 +03:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: `cfg` predicate key must be an identifier
|
|
|
|
--> $DIR/cfg-attr-syntax-validation.rs:16:7
|
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | #[cfg(a::b)]
|
2018-09-02 00:13:22 +03:00
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
error[E0537]: invalid predicate `a`
|
|
|
|
--> $DIR/cfg-attr-syntax-validation.rs:19:7
|
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | #[cfg(a())]
|
2018-09-02 00:13:22 +03:00
|
|
|
| ^^^
|
|
|
|
|
2018-10-20 11:11:01 +08:00
|
|
|
error[E0565]: literal in `cfg` predicate value must be a string
|
2018-09-02 00:13:22 +03:00
|
|
|
--> $DIR/cfg-attr-syntax-validation.rs:22:11
|
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | #[cfg(a = 10)]
|
2018-09-02 00:13:22 +03:00
|
|
|
| ^^
|
|
|
|
|
2018-10-20 11:11:01 +08:00
|
|
|
error[E0565]: literal in `cfg` predicate value must be a string
|
|
|
|
--> $DIR/cfg-attr-syntax-validation.rs:25:11
|
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | #[cfg(a = b"hi")]
|
2022-08-27 02:23:21 +09:00
|
|
|
| -^^^^
|
|
|
|
| |
|
|
|
|
| help: consider removing the prefix
|
2018-10-20 11:11:01 +08:00
|
|
|
|
2019-03-06 13:16:52 -08:00
|
|
|
error: expected unsuffixed literal or identifier, found `concat!("nonexistent")`
|
2019-03-05 19:05:03 -08:00
|
|
|
--> $DIR/cfg-attr-syntax-validation.rs:30:25
|
2018-09-02 00:13:22 +03:00
|
|
|
|
|
2019-01-02 02:21:05 +03:00
|
|
|
LL | #[cfg(feature = $expr)]
|
2019-03-05 19:05:03 -08:00
|
|
|
| ^^^^^
|
2018-09-02 00:13:22 +03:00
|
|
|
...
|
2018-10-20 11:11:01 +08:00
|
|
|
LL | generate_s10!(concat!("nonexistent"));
|
2021-10-14 13:28:28 -05:00
|
|
|
| ------------------------------------- in this macro invocation
|
2019-12-16 15:56:47 +02:00
|
|
|
|
|
2021-02-13 14:52:25 -05:00
|
|
|
= note: this error originates in the macro `generate_s10` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2018-09-02 00:13:22 +03:00
|
|
|
|
2020-09-27 16:52:51 +03:00
|
|
|
error: expected unsuffixed literal or identifier, found `concat!("nonexistent")`
|
|
|
|
--> $DIR/cfg-attr-syntax-validation.rs:30:25
|
|
|
|
|
|
|
|
|
LL | #[cfg(feature = $expr)]
|
|
|
|
| ^^^^^
|
|
|
|
...
|
|
|
|
LL | generate_s10!(concat!("nonexistent"));
|
2021-10-14 13:28:28 -05:00
|
|
|
| ------------------------------------- in this macro invocation
|
2020-09-27 16:52:51 +03:00
|
|
|
|
|
2023-10-04 18:34:50 +00:00
|
|
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
2021-02-13 14:52:25 -05:00
|
|
|
= note: this error originates in the macro `generate_s10` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2020-09-27 16:52:51 +03:00
|
|
|
|
|
|
|
error: aborting due to 11 previous errors
|
2018-09-02 00:13:22 +03:00
|
|
|
|
2019-04-17 13:26:38 -04:00
|
|
|
Some errors have detailed explanations: E0537, E0565.
|
2018-10-09 22:55:07 +08:00
|
|
|
For more information about an error, try `rustc --explain E0537`.
|