f7c4a44149
Resolves 5011 Tuple structs with visibility modifiers and comments before the first field were incorrectly formatted. Comments would duplicate part of the visibility modifier and struct name. When trying to parse the tuple fields the ``items::Context`` searches for the opening '(', but because the visibility modifier introduces another '(' -- for example ``pub(crate)`` -- the parsing gets messed up. Now the span is adjusted to start after the struct identifier, or after any generics. Adjusting the span in this way ensures that the ``items::Contex`` will correctly find the tuple fields. |
||
---|---|---|
.. | ||
cargo-fmt | ||
config | ||
coverage | ||
license-template | ||
mod-resolver/issue-4874 | ||
parser | ||
rustfmt | ||
source | ||
target | ||
writemode |