-
Notifications
You must be signed in to change notification settings - Fork 936
Open
Description
Formatting the following code produces awful results:
fn main() {
{
{
{
let result = this_is_a_quite_long_name(
another_long_one,
&|from, to| -> LongResult<Words> {
() // this comment is to keep it from collapsing
}
)?;
}
}
}
}
it's formatted into this:
fn main() {
{
{
{
let result = this_is_a_quite_long_name(another_long_one, &|from,
to|
-> LongResult<
Words,
> {
() // this comment is to keep it from collapsing
})?;
}
}
}
}
playground: link
I can ignore it by using #[rustfmt::skip]
but this behavior seems incorrect.
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
ytmimi commentedon Nov 2, 2024
Likely a duplicate of one of these other closure formatting issues: https://github.com/rust-lang/rustfmt/issues?q=is%3Aissue%20state%3Aopen%20label%3Aa-closures
Paladynee commentedon Nov 28, 2024
this feels like it would go away if you set a wider character limit