Closed as not planned
Description
i know that due to #1063 one.0.1
is formatted as one.0 .1
, so that the 0.1
doesn't get interpreted as a float literal.
but if the next lines are long enough that the 0.1
gets put onto the next line, then that should not be affected by the bug in #1063, and could be formatted like expected.
this gets fixed by adding version = "Two"
, but as far as i can tell could be fixed with version = "One"
as well.
struct One(Two);
impl One {
fn new() -> Self {
One(Two((), Three))
}
}
struct Two((), Three);
struct Three;
impl Three {
fn test(&self, _: &str) -> bool {
true
}
}
fn main() {
let one = One::new();
let _ = one.0 .1; // this is due to https://github.com/rust-lang/rustfmt/issues/1063
let _ = one
.0
.1 // this shouldn't be affected by that and just looks very bad
.test("really really long string so that it wraps to the next line");
}