Open shepmaster opened 6 years ago
Happens with use
imports too
See https://github.com/rust-lang-nursery/rustfmt/issues/3128#issuecomment-433155914 for an explanation of why.
After some investigation it seems that fixing this is pretty difficult, so un-blocking the milestone, would be good to fix this though.
Confirming I can still reproduce this with rustfmt 1.5.1-nightly (f2c31ba0 2022-07-19)
. The issue is with reorder_imports
, which is a stable option. One way to work around this is to set reorder_imports=false
.
input
extern crate serde; // 1.0.78
extern crate serde_json; // 1.0.27
extern crate serde_derive; // 1.0.78
output reorder_imports=false
extern crate serde; // 1.0.78
extern crate serde_json; // 1.0.27
extern crate serde_derive; // 1.0.78
0.99.6-nightly (2018-10-18 750b252)
Before
After
Expected