-
Notifications
You must be signed in to change notification settings - Fork 973
Closed
Labels
E-help-wantedCall for participation: help is requested to fix this issueCall for participation: help is requested to fix this issuegood first issueIssues up for grabs, also good candidates for new rustfmt contributorsIssues up for grabs, also good candidates for new rustfmt contributorsonly-with-optionRequires a non-default option value to reproduceRequires a non-default option value to reproduce
Description
1.4.37-nightly
Using this rustfmt.toml
brace_style = "AlwaysNextLine"
empty_item_single_line = truerustfmt will format the following code like this:
fn function() {}
struct Struct {}
enum Enum {}
trait Trait
{
}
impl<T> Trait for T {}This is inconsistent, and empty traits end up sticking out like a sore thumb. Intended behaviour is probably this:
fn function() {}
struct Struct {}
enum Enum {}
trait Trait {}
impl<T> Trait for T {}This is important, as empty traits are often quite useful. For instance, you might want something like this:
trait Trait: Send + Clone {}
impl<T: Send + Clone> Trait for T {}which will look quite ugly at the moment.
iago-lito
Metadata
Metadata
Assignees
Labels
E-help-wantedCall for participation: help is requested to fix this issueCall for participation: help is requested to fix this issuegood first issueIssues up for grabs, also good candidates for new rustfmt contributorsIssues up for grabs, also good candidates for new rustfmt contributorsonly-with-optionRequires a non-default option value to reproduceRequires a non-default option value to reproduce