You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fnfoo(){
a.first().second().third().fourth(|| {let a = 1;}).fifth(some_argument).sixth("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");}
is left completely untouched due to being unable to fit the long argument, even in the presence of patterns that must be broken into multiple lines (|| { let a = 1; } in this case). I'd expect rustfmt to do the best it can even if that means leaving some lines overflowing (which would be better than not doing anything), for instance like this:
fnfoo(){
a.first().second().third().fourth(|| {let a = 1;}).fifth(some_argument).sixth("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",);}
The text was updated successfully, but these errors were encountered:
That would be better, but I think this is p-low because it would be a fairly disruptive change and in any case the user has to fix this up. Also since the formatting causes an error I think we can fix this backwards compatibly post 1.0.
rustfmt 0.99.2-nightly (5c9a2b6 2018-08-07)
Input like:
is left completely untouched due to being unable to fit the long argument, even in the presence of patterns that must be broken into multiple lines (
|| { let a = 1; }
in this case). I'd expect rustfmt to do the best it can even if that means leaving some lines overflowing (which would be better than not doing anything), for instance like this:The text was updated successfully, but these errors were encountered: