2025-07-07 09:10:38 +02:00
|
|
|
error[E0539]: malformed `cfg` attribute input
|
2018-09-02 00:13:22 +03:00
|
|
|
--> $DIR/cfg-attr-syntax-validation.rs:1:1
|
|
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | #[cfg]
|
2025-07-07 09:10:38 +02:00
|
|
|
| ^^^^^^
|
|
|
|
|
| |
|
|
|
|
|
| expected this to be a list
|
|
|
|
|
| help: must be of the form: `#[cfg(predicate)]`
|
2025-08-11 17:02:32 +00:00
|
|
|
|
|
|
|
|
|
= note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg-attribute>
|
2018-09-02 00:13:22 +03:00
|
|
|
|
2025-07-07 09:10:38 +02:00
|
|
|
error[E0539]: malformed `cfg` attribute input
|
2025-08-11 17:02:32 +00:00
|
|
|
--> $DIR/cfg-attr-syntax-validation.rs:7:1
|
2018-09-02 00:13:22 +03:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | #[cfg = 10]
|
2025-07-07 09:10:38 +02:00
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
| |
|
|
|
|
|
| expected this to be a list
|
|
|
|
|
| help: must be of the form: `#[cfg(predicate)]`
|
2025-08-11 17:02:32 +00:00
|
|
|
|
|
|
|
|
|
= note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg-attribute>
|
2018-09-02 00:13:22 +03:00
|
|
|
|
2025-07-07 09:10:38 +02:00
|
|
|
error[E0805]: malformed `cfg` attribute input
|
2025-08-11 17:02:32 +00:00
|
|
|
--> $DIR/cfg-attr-syntax-validation.rs:13:1
|
2018-09-02 00:13:22 +03:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | #[cfg()]
|
2025-07-07 09:10:38 +02:00
|
|
|
| ^^^^^--^
|
|
|
|
|
| | |
|
|
|
|
|
| | expected a single argument here
|
|
|
|
|
| help: must be of the form: `#[cfg(predicate)]`
|
2025-08-11 17:02:32 +00:00
|
|
|
|
|
|
|
|
|
= note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg-attribute>
|
2018-09-02 00:13:22 +03:00
|
|
|
|
2025-07-07 09:10:38 +02:00
|
|
|
error[E0805]: malformed `cfg` attribute input
|
2025-08-11 17:02:32 +00:00
|
|
|
--> $DIR/cfg-attr-syntax-validation.rs:19:1
|
2018-09-02 00:13:22 +03:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | #[cfg(a, b)]
|
2025-07-07 09:10:38 +02:00
|
|
|
| ^^^^^------^
|
|
|
|
|
| | |
|
|
|
|
|
| | expected a single argument here
|
|
|
|
|
| help: must be of the form: `#[cfg(predicate)]`
|
2025-08-11 17:02:32 +00:00
|
|
|
|
|
|
|
|
|
= note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg-attribute>
|
2018-09-02 00:13:22 +03:00
|
|
|
|
2025-07-07 09:10:38 +02:00
|
|
|
error: `cfg` predicate key must be an identifier
|
2025-08-11 17:02:32 +00:00
|
|
|
--> $DIR/cfg-attr-syntax-validation.rs:25:7
|
2018-09-02 00:13:22 +03:00
|
|
|
|
|
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
|
2025-08-11 17:02:32 +00:00
|
|
|
--> $DIR/cfg-attr-syntax-validation.rs:28:7
|
2018-09-02 00:13:22 +03:00
|
|
|
|
|
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`
|
2025-08-11 17:02:32 +00:00
|
|
|
--> $DIR/cfg-attr-syntax-validation.rs:31:7
|
2018-09-02 00:13:22 +03:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | #[cfg(a())]
|
2018-09-02 00:13:22 +03:00
|
|
|
| ^^^
|
|
|
|
|
|
2025-07-07 09:10:38 +02:00
|
|
|
error[E0539]: malformed `cfg` attribute input
|
2025-08-11 17:02:32 +00:00
|
|
|
--> $DIR/cfg-attr-syntax-validation.rs:34:1
|
2018-09-02 00:13:22 +03:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | #[cfg(a = 10)]
|
2025-07-07 09:10:38 +02:00
|
|
|
| ^^^^^^^^^^--^^
|
|
|
|
|
| | |
|
|
|
|
|
| | expected a string literal here
|
|
|
|
|
| help: must be of the form: `#[cfg(predicate)]`
|
2025-08-11 17:02:32 +00:00
|
|
|
|
|
|
|
|
|
= note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg-attribute>
|
2018-09-02 00:13:22 +03:00
|
|
|
|
2025-07-07 09:10:38 +02:00
|
|
|
error[E0539]: malformed `cfg` attribute input
|
2025-08-11 17:02:32 +00:00
|
|
|
--> $DIR/cfg-attr-syntax-validation.rs:39:1
|
2018-10-20 11:11:01 +08:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | #[cfg(a = b"hi")]
|
2025-07-07 09:10:38 +02:00
|
|
|
| ^^^^^^^^^^-^^^^^^
|
2022-08-27 02:23:21 +09:00
|
|
|
| |
|
|
|
|
|
| help: consider removing the prefix
|
2025-07-07 09:10:38 +02:00
|
|
|
|
|
|
|
|
|
= note: expected a normal string literal, not a byte string literal
|
2018-10-20 11:11:01 +08:00
|
|
|
|
2025-07-31 15:38:44 +02:00
|
|
|
error: expected a literal (`1u8`, `1.0f32`, `"string"`, etc.) here, found `expr` metavariable
|
2025-08-11 17:02:32 +00:00
|
|
|
--> $DIR/cfg-attr-syntax-validation.rs:45: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
|
|
|
|
2025-03-22 21:42:34 +03:00
|
|
|
error: aborting due to 10 previous errors
|
2018-09-02 00:13:22 +03:00
|
|
|
|
2025-07-07 09:10:38 +02:00
|
|
|
Some errors have detailed explanations: E0537, E0539, E0805.
|
2018-10-09 22:55:07 +08:00
|
|
|
For more information about an error, try `rustc --explain E0537`.
|