| error[E0539]: malformed `cfg_attr` attribute input |
| --> $DIR/cfg_attr-attr-syntax-validation.rs:1:1 |
| | |
| LL | #[cfg_attr] |
| | ^^^^^^^^^^^ expected this to be a list |
| | |
| = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute> |
| help: must be of the form |
| | |
| LL | #[cfg_attr(predicate, attr1, attr2, ...)] |
| | ++++++++++++++++++++++++++++++ |
| |
| error[E0539]: malformed `cfg_attr` attribute input |
| --> $DIR/cfg_attr-attr-syntax-validation.rs:5:1 |
| | |
| LL | #[cfg_attr = 10] |
| | ^^^^^^^^^^^^^^^^ expected this to be a list |
| | |
| = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute> |
| help: must be of the form |
| | |
| LL - #[cfg_attr = 10] |
| LL + #[cfg_attr(predicate, attr1, attr2, ...)] |
| | |
| |
| error[E0539]: malformed `cfg_attr` attribute input |
| --> $DIR/cfg_attr-attr-syntax-validation.rs:9:1 |
| | |
| LL | #[cfg_attr()] |
| | ^^^^^^^^^^--^ |
| | | |
| | expected at least 1 argument here |
| | |
| = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute> |
| help: must be of the form |
| | |
| LL | #[cfg_attr(predicate, attr1, attr2, ...)] |
| | ++++++++++++++++++++++++++++ |
| |
| error[E0565]: malformed `cfg_attr` attribute input |
| --> $DIR/cfg_attr-attr-syntax-validation.rs:13:1 |
| | |
| LL | #[cfg_attr("str")] |
| | ^^^^^^^^^^^-----^^ |
| | | |
| | expected a valid identifier here |
| | |
| = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute> |
| help: must be of the form |
| | |
| LL - #[cfg_attr("str")] |
| LL + #[cfg_attr(predicate, attr1, attr2, ...)] |
| | |
| |
| error[E0565]: malformed `cfg_attr` attribute input |
| --> $DIR/cfg_attr-attr-syntax-validation.rs:16:1 |
| | |
| LL | #[cfg_attr(a::b)] |
| | ^^^^^^^^^^^----^^ |
| | | |
| | expected a valid identifier here |
| | |
| = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute> |
| help: must be of the form |
| | |
| LL - #[cfg_attr(a::b)] |
| LL + #[cfg_attr(predicate, attr1, attr2, ...)] |
| | |
| |
| error[E0539]: malformed `cfg_attr` attribute input |
| --> $DIR/cfg_attr-attr-syntax-validation.rs:19:1 |
| | |
| LL | #[cfg_attr(a())] |
| | ^^^^^^^^^^^---^^ |
| | | |
| | valid arguments are `any`, `all`, `not` or `target` |
| | |
| = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute> |
| help: must be of the form |
| | |
| LL - #[cfg_attr(a())] |
| LL + #[cfg_attr(predicate, attr1, attr2, ...)] |
| | |
| |
| error[E0539]: malformed `cfg_attr` attribute input |
| --> $DIR/cfg_attr-attr-syntax-validation.rs:22:1 |
| | |
| LL | #[cfg_attr(a = 10)] |
| | ^^^^^^^^^^^^^^^--^^ |
| | | |
| | expected a string literal here |
| | |
| = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute> |
| help: must be of the form |
| | |
| LL - #[cfg_attr(a = 10)] |
| LL + #[cfg_attr(predicate, attr1, attr2, ...)] |
| | |
| |
| error[E0539]: malformed `cfg_attr` attribute input |
| --> $DIR/cfg_attr-attr-syntax-validation.rs:25:1 |
| | |
| LL | #[cfg_attr(a = b"hi")] |
| | ^^^^^^^^^^^^^^^-^^^^^^ |
| | | |
| | help: consider removing the prefix |
| | |
| = note: expected a normal string literal, not a byte string literal |
| |
| error: expected `,`, found end of `cfg_attr` input |
| --> $DIR/cfg_attr-attr-syntax-validation.rs:38:16 |
| | |
| LL | #[cfg_attr(true)] |
| | ^ expected `,` |
| | |
| = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute> |
| help: must be of the form |
| | |
| LL - #[cfg_attr(true)] |
| LL + #[cfg_attr(predicate, attr1, attr2, ...)] |
| | |
| |
| error: expected a literal (`1u8`, `1.0f32`, `"string"`, etc.) here, found `expr` metavariable |
| --> $DIR/cfg_attr-attr-syntax-validation.rs:30:30 |
| | |
| LL | #[cfg_attr(feature = $expr)] |
| | ^^^^^ |
| ... |
| LL | generate_s10!(concat!("nonexistent")); |
| | ------------------------------------- in this macro invocation |
| | |
| = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute> |
| = note: this error originates in the macro `generate_s10` (in Nightly builds, run with -Z macro-backtrace for more info) |
| help: must be of the form |
| | |
| LL - #[cfg_attr(feature = $expr)] |
| LL + #[cfg_attr(predicate, attr1, attr2, ...)] |
| | |
| |
| error: cannot find attribute `unknown_attribute` in this scope |
| --> $DIR/cfg_attr-attr-syntax-validation.rs:41:18 |
| | |
| LL | #[cfg_attr(true, unknown_attribute)] |
| | ^^^^^^^^^^^^^^^^^ |
| |
| error[E0539]: malformed `link_section` attribute input |
| --> $DIR/cfg_attr-attr-syntax-validation.rs:44:18 |
| | |
| LL | #[cfg_attr(true, link_section)] |
| | ^^^^^^^^^^^^ |
| | |
| = note: for more information, visit <https://doc.rust-lang.org/reference/abi.html#the-link_section-attribute> |
| help: must be of the form |
| | |
| LL | #[cfg_attr(true, link_section = "name")] |
| | ++++++++ |
| |
| error[E0805]: malformed `inline` attribute input |
| --> $DIR/cfg_attr-attr-syntax-validation.rs:49:18 |
| | |
| LL | #[cfg_attr(true, inline())] |
| | ^^^^^^-- |
| | | |
| | expected an argument here |
| | |
| = note: for more information, visit <https://doc.rust-lang.org/reference/attributes/codegen.html#the-inline-attribute> |
| help: try changing it to one of the following valid forms of the attribute |
| | |
| LL - #[cfg_attr(true, inline())] |
| LL + #[cfg_attr(true, inline)] |
| | |
| LL | #[cfg_attr(true, inline(always))] |
| | ++++++ |
| LL | #[cfg_attr(true, inline(never))] |
| | +++++ |
| |
| warning: `#[link_section]` attribute cannot be used on structs |
| --> $DIR/cfg_attr-attr-syntax-validation.rs:44:18 |
| | |
| LL | #[cfg_attr(true, link_section)] |
| | ^^^^^^^^^^^^ |
| | |
| = help: `#[link_section]` can be applied to functions and statics |
| = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! |
| = note: requested on the command line with `-W unused-attributes` |
| |
| error: aborting due to 13 previous errors; 1 warning emitted |
| |
| Some errors have detailed explanations: E0539, E0565, E0805. |
| For more information about an error, try `rustc --explain E0539`. |