1- error: malformed `cfg_attr` attribute input
1+ error[E0539] : malformed `cfg_attr` attribute input
22 --> $DIR/cfg-attr-parse.rs:4:1
33 |
44LL | #[cfg_attr()]
5- | ^^^^^^^^^^^^^
5+ | ^^^^^^^^^^--^
6+ | | |
7+ | | expected at least 1 argument here
8+ | help: must be of the form: `#[cfg_attr(predicate, attr1, attr2, ...)]`
69 |
710 = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute>
8- help: missing condition and attribute
9- |
10- LL | #[cfg_attr(condition, attribute, other_attribute, ...)]
11- | ++++++++++++++++++++++++++++++++++++++++++
1211
1312error: expected `,`, found end of `cfg_attr` input
1413 --> $DIR/cfg-attr-parse.rs:8:17
1514 |
1615LL | #[cfg_attr(all())]
17- | ^ expected `,`
16+ | ----------------^-
17+ | | |
18+ | | expected `,`
19+ | help: must be of the form: `#[cfg_attr(predicate, attr1, attr2, ...)]`
1820 |
19- = help: the valid syntax is `#[cfg_attr(condition, attribute, other_attribute, ...)]`
2021 = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute>
2122
2223error: expected identifier, found `,`
2324 --> $DIR/cfg-attr-parse.rs:16:18
2425 |
2526LL | #[cfg_attr(all(),,)]
26- | ^ expected identifier
27+ | -----------------^--
28+ | | |
29+ | | expected identifier
30+ | help: must be of the form: `#[cfg_attr(predicate, attr1, attr2, ...)]`
2731 |
28- = help: the valid syntax is `#[cfg_attr(condition, attribute, other_attribute, ...)]`
2932 = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute>
3033
3134error: expected identifier, found `,`
3235 --> $DIR/cfg-attr-parse.rs:28:28
3336 |
3437LL | #[cfg_attr(all(), must_use,,)]
35- | ^ expected identifier
38+ | ---------------------------^--
39+ | | |
40+ | | expected identifier
41+ | help: must be of the form: `#[cfg_attr(predicate, attr1, attr2, ...)]`
3642 |
37- = help: the valid syntax is `#[cfg_attr(condition, attribute, other_attribute, ...)]`
3843 = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute>
3944
4045error: expected identifier, found `,`
4146 --> $DIR/cfg-attr-parse.rs:40:40
4247 |
4348LL | #[cfg_attr(all(), must_use, deprecated,,)]
44- | ^ expected identifier
49+ | ---------------------------------------^--
50+ | | |
51+ | | expected identifier
52+ | help: must be of the form: `#[cfg_attr(predicate, attr1, attr2, ...)]`
4553 |
46- = help: the valid syntax is `#[cfg_attr(condition, attribute, other_attribute, ...)]`
4754 = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute>
4855
4956error: wrong `cfg_attr` delimiters
@@ -62,9 +69,11 @@ error: expected identifier, found `,`
6269 --> $DIR/cfg-attr-parse.rs:44:18
6370 |
6471LL | #[cfg_attr[all(),,]]
65- | ^ expected identifier
72+ | -----------------^--
73+ | | |
74+ | | expected identifier
75+ | help: must be of the form: `#[cfg_attr(predicate, attr1, attr2, ...)]`
6676 |
67- = help: the valid syntax is `#[cfg_attr(condition, attribute, other_attribute, ...)]`
6877 = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute>
6978
7079error: wrong `cfg_attr` delimiters
@@ -83,10 +92,13 @@ error: expected identifier, found `,`
8392 --> $DIR/cfg-attr-parse.rs:50:18
8493 |
8594LL | #[cfg_attr{all(),,}]
86- | ^ expected identifier
95+ | -----------------^--
96+ | | |
97+ | | expected identifier
98+ | help: must be of the form: `#[cfg_attr(predicate, attr1, attr2, ...)]`
8799 |
88- = help: the valid syntax is `#[cfg_attr(condition, attribute, other_attribute, ...)]`
89100 = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute>
90101
91102error: aborting due to 9 previous errors
92103
104+ For more information about this error, try `rustc --explain E0539`.
0 commit comments