rustfmt icon indicating copy to clipboard operation
rustfmt copied to clipboard

Fix long type paths by breaking paths into multiple lines when exceeding maximum width

Open danielhuang opened this issue 10 months ago • 2 comments

A long type path could look like long_type_path::long_type_path::long_type_path::long_type_path::long_type_path::long_type_path::long_type_path::long_type_path::long_type_path::long_type_path::Long which currently would not get formatted. This fix would break the path into multiple lines if necessary.

danielhuang avatar Mar 08 '25 23:03 danielhuang

Does not fix https://github.com/rust-lang/rustfmt/issues/3863#issuecomment-1857897142 yet.

danielhuang avatar Mar 08 '25 23:03 danielhuang

I'm not sure how we should move forward here. I'm going to mark this one as blocked for now. If you could, please file an issue with team-style to see if they have any suggestions for defining rules on how to break long path names.

ytmimi avatar Mar 11 '25 14:03 ytmimi