
I'm removing empty identifiers everywhere, because in practice they always mean "no identifier" rather than "empty identifier". (An empty identifier is impossible.) It's better to use `Option` to mean "no identifier" because you then can't forget about the "no identifier" possibility. Some specifics: - When testing an attribute for a single name, the commit uses the `has_name` method. - When testing an attribute for multiple names, the commit uses the new `has_any_name` method. - When using `match` on an attribute, the match arms now have `Some` on them. In the tests, we now avoid printing empty identifiers by not printing the identifier in the `error:` line at all, instead letting the carets point out the problem.
26 lines
779 B
Text
26 lines
779 B
Text
error: `#[macro_export]` can only take 1 or 0 arguments
|
|
--> $DIR/invalid_macro_export_argument.rs:7:1
|
|
|
|
|
LL | #[macro_export(hello, world)]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
note: the lint level is defined here
|
|
--> $DIR/invalid_macro_export_argument.rs:4:24
|
|
|
|
|
LL | #![cfg_attr(deny, deny(invalid_macro_export_arguments))]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: invalid `#[macro_export]` argument
|
|
--> $DIR/invalid_macro_export_argument.rs:13:16
|
|
|
|
|
LL | #[macro_export(not_local_inner_macros)]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: invalid `#[macro_export]` argument
|
|
--> $DIR/invalid_macro_export_argument.rs:33:16
|
|
|
|
|
LL | #[macro_export("blah")]
|
|
| ^^^^^^
|
|
|
|
error: aborting due to 3 previous errors
|
|
|