You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding #[rustfmt:skip] to a macro definition causes rustc errors when trying to import it.
error: cannot determine resolution for the import
--> src/main.rs:10:9
|
10 | use crate::o;
| ^^^^^^^^
|
= note: import resolution is stuck, try simplifying other imports
error: macro-expanded `macro_export` macros from the current crate cannot be referred to by absolute paths
--> src/main.rs:10:9
|
10 | use crate::o;
| ^^^^^^^^
|
= note: `#[deny(macro_expanded_macro_exports_accessed_by_absolute_paths)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #52234 <https://github.com/rust-lang/rust/issues/52234>
note: the macro is defined here
--> src/main.rs:4:5
|
4 | / macro_rules! o {
5 | | () => {};
6 | | }
| |_____^
error: aborting due to 2 previous errors
To Reproduce
Have two modules, in one add a macro definition with #[rustfmt:skip], and in the other import the macro. The module with import will fail to compile
Heres a playground link used to create the log above.
Thanks for reaching out @Txuritan, but rustc-related issues need to be reported in the main rust-lang/rust repo (note that this can be reproduced with other, non rustfmt tool attributes like #[clippy::cyclomatic_complexity = "100"]).
Describe the bug
Adding
#[rustfmt:skip]
to a macro definition causes rustc errors when trying to import it.To Reproduce
Have two modules, in one add a macro definition with
#[rustfmt:skip]
, and in the other import the macro. The module with import will fail to compileHeres a playground link used to create the log above.
Meta
rustfmt
The text was updated successfully, but these errors were encountered: