-
Notifications
You must be signed in to change notification settings - Fork 932
Remove newline in empty impl #2741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
tests/target/impls.rs
Outdated
T: PartialEq, | ||
{ | ||
} | ||
T: PartialEq, {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these changes are incorrect - we should only use the {}
form (c.f., with a newline) if the whole impl fits on one line. Also, we should not have a trailing comma if there is a brace on the same line.
tests/target/impl.rs
Outdated
@@ -28,7 +28,7 @@ impl<T> Foo for T | |||
where | |||
// comment2 | |||
// blah | |||
T: Clone, | |||
T: Clone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trailing comma is trimmed since where clause contains comments. is it fine? @nrc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should not remove the comma - we should keep the comma if it is mulit-line and remove it if it is single line. Whether it is multiline because there are multiple clauses or because of comments shouldn't matter.
@csmoe failing tests due to overlong line |
Thanks! |
Closes #2736