-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
Labels
bugPanic, non-idempotency, invalid code, etc.Panic, non-idempotency, invalid code, etc.only-with-optionrequires a non-default option value to reproducerequires a non-default option value to reproducep-highpoor-formatting
Milestone
Description
Reproduction:
pub fn main()
{
let world1 = "world"; println!("Hello, {}!", world1);
let world2 = "world"; println!("Hello, {}!", world2);
let world3 = "world"; println!("Hello, {}!", world3);
}
Using the following invocation:
rustfmt --file-lines '[{"file":"$FILE", "range": [2,3]}]' $FILE --unstable-features
Results
If the text has LF as EOL:
pub fn main() {
let world1 = "world";
println!("Hello, {}!", world1);
let world2 = "world"; println!("Hello, {}!", world2);
let world3 = "world"; println!("Hello, {}!", world3);
}
If the text has CRLF as EOL:
pub fn main() {
let world1 = "world";
println!("Hello, {}!", world1);
let world2 = "world"; println!("Hello, {}!", world2);
let world3 = "world"; println!("Hello, {}!", world3);
}
@scampi do you have any idea what may cause that? I'd be willing to look into this.
Metadata
Metadata
Assignees
Labels
bugPanic, non-idempotency, invalid code, etc.Panic, non-idempotency, invalid code, etc.only-with-optionrequires a non-default option value to reproducerequires a non-default option value to reproducep-highpoor-formatting