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
Using rustfmt-nightly (1.0.1-nightly) I get "internal error: left behind trailing whitespace" for the following sample program:
use std::fmt::{self,Display};pubenumFooLongEnum{AVeryLongEnumName,BNotherLongEnumName}implDisplayforFoo{fnfmt(&self,f:&mut fmt::Formatter) -> fmt::Result{let description = matchself{FooLongEnum::AVeryLongEnumName => String::from("this is a very very very very very very very very very very very very very very very very long string"),};write!(f,"{}", description)}}
The text was updated successfully, but these errors were encountered:
I'd like to work on this.
I created a small reproducible code like below.
pub enum TestEnum {
a,
b,
}
fn test_fn(input: TestEnum) {
match input {
TestEnum::a => String::from("aaa"),
TestEnum::b => String::from("this is a very very very very very very very very very very very very very very very ong string"),
};
}
I found format_expr return None in rewrite_match_body.
Maybe I can resolve this issue.
Using rustfmt-nightly (1.0.1-nightly) I get "internal error: left behind trailing whitespace" for the following sample program:
The text was updated successfully, but these errors were encountered: