Open Dinonard opened 2 years ago
Thanks for the report! Confirming I can reproduce this with rustfmt 1.5.1-nightly (2f3ddd9f 2022-06-27)
A smaller reproducible example. No macro needed.
Input
struct Runtime {
Council: pallet_collective::<Instance1>
}
Output
struct Runtime {
Council: pallet_collective<Instance1>,
}
hmm okay on second thought I think we actually want to remove the ::
if we're not in a macro context, but inside the macro we don't want to remove tokens, so I guess this is actually only an issue in the macro case. Related issues: #3139
Ran into this issue today too.
Hello,
rustfmt
will remove::
from a macro.To illustrate:
After running
cargo fmt
:The compilation will fail afterwards. We're using Rust
nightly-2022-07-24
.