-
-
Couldn't load subscription status.
- Fork 4
Open
Description
impl_scope! { ... } and impl_anon! { ... } should be formatted internally just like a module. rustfmt does not currently support this: see rust-lang/rustfmt#5538.
#53 introduced #[impl_self] mod { ... } as a replacement for impl_scope! { ... }. The usage of a fake module appears to have completely solved rustfmt compatibility, but comes with a new problem: rust-analyzer sometimes inserts use ...; statements inside this fake module, leading to macro parse errors.
Possible solutions:
- Wait for
rustfmtto support formatting braced-wrapped macros as a module? - Try getting
rust-analyzerto ignore the fake module? This seems an unlikely approach; it would require r-a to either have an exception for this macro or expand macros before addingusestatements (which may also have issues). - Propose an RFC with similar functionality to the above? There have been some related proposals in the past (example).
Metadata
Metadata
Assignees
Labels
No labels