-
Notifications
You must be signed in to change notification settings - Fork 882
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
Remove empty "where" clauses #4001
Labels
Comments
ayazhafiz
added a commit
to ayazhafiz/rustfmt
that referenced
this issue
May 13, 2020
rustfmt tries to preserve the comment between a fn return type and the start of the fn body if there are no where clauses following the return type. However, even if there are no where clauses present, the "where" keyword may be. To elide the "where" keyword in this context, just get the comment snippet starting after the where clause span, which always includes the "where" keyword if present. Closes rust-lang#4001
topecongiro
pushed a commit
that referenced
this issue
May 16, 2020
rustfmt tries to preserve the comment between a fn return type and the start of the fn body if there are no where clauses following the return type. However, even if there are no where clauses present, the "where" keyword may be. To elide the "where" keyword in this context, just get the comment snippet starting after the where clause span, which always includes the "where" keyword if present. Closes #4001
bradleypmartin
pushed a commit
to bradleypmartin/rustfmt
that referenced
this issue
May 25, 2020
rustfmt tries to preserve the comment between a fn return type and the start of the fn body if there are no where clauses following the return type. However, even if there are no where clauses present, the "where" keyword may be. To elide the "where" keyword in this context, just get the comment snippet starting after the where clause span, which always includes the "where" keyword if present. Closes rust-lang#4001
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
rustfmt leaves
fn foo() -> () where {}
as-is, when it should ideally remove thewhere
. However, it does changefn foo() where {}
tofn foo() {}
.The text was updated successfully, but these errors were encountered: