Skip to content
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

New lint: suspicious_unary_op_formatting #4615

Merged
merged 1 commit into from
Oct 9, 2019

Conversation

nikofil
Copy link
Contributor

@nikofil nikofil commented Oct 3, 2019

fixes #4228

changelog: New lint: [suspicious_unary_op_formatting]

@phansch phansch added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Oct 4, 2019
tests/ui/formatting.rs Outdated Show resolved Hide resolved
@nikofil nikofil force-pushed the suspicious_unary_op_formatting branch 2 times, most recently from 9c4ae63 to 9b2011e Compare October 4, 2019 08:38
@flip1995 flip1995 added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Oct 4, 2019
@nikofil nikofil force-pushed the suspicious_unary_op_formatting branch from 9b2011e to 589c20a Compare October 4, 2019 11:57
@nikofil nikofil force-pushed the suspicious_unary_op_formatting branch from 589c20a to 4b2aaf2 Compare October 7, 2019 13:52
@nikofil nikofil force-pushed the suspicious_unary_op_formatting branch from 4b2aaf2 to 9ab1958 Compare October 7, 2019 15:16
Copy link
Member

@flip1995 flip1995 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Waiting on travis.

@flip1995
Copy link
Member

flip1995 commented Oct 8, 2019

You have to rerun util/dev update_lints

@nikofil nikofil force-pushed the suspicious_unary_op_formatting branch from 9ab1958 to b355d48 Compare October 8, 2019 14:09
@nikofil
Copy link
Contributor Author

nikofil commented Oct 8, 2019

You have to rerun util/dev update_lints

I did, but nothing changed. In fact I had made the changes by hand before discovering that the tool does them automatically. I deleted them and made them again with the tool, but nothing changed.

Also, the error claims the list in src/lintlist/mod.rs has 320 items yet on my commit it has 319. Do I have to rebase on top of master, maybe?

@bors
Copy link
Collaborator

bors commented Oct 8, 2019

☔ The latest upstream changes (presumably #4602) made this pull request unmergeable. Please resolve the merge conflicts.

@flip1995
Copy link
Member

flip1995 commented Oct 9, 2019

Do I have to rebase on top of master, maybe?

Oh yeah you have to rebase before running the script successfully.

@nikofil nikofil force-pushed the suspicious_unary_op_formatting branch 2 times, most recently from 2cc972d to 63ffbc4 Compare October 9, 2019 11:16
Lints when, on the RHS of a BinOp, there is a UnOp without a space
before the operator but with a space after (e.g. foo >- 1).

Signed-off-by: Nikos Filippakis <nikolaos.filippakis@cern.ch>
@nikofil nikofil force-pushed the suspicious_unary_op_formatting branch from 63ffbc4 to 5143fe1 Compare October 9, 2019 14:22
@nikofil
Copy link
Contributor Author

nikofil commented Oct 9, 2019

Tests are passing :)

@flip1995
Copy link
Member

flip1995 commented Oct 9, 2019

@bors r+

@bors
Copy link
Collaborator

bors commented Oct 9, 2019

📌 Commit 5143fe1 has been approved by flip1995

@bors
Copy link
Collaborator

bors commented Oct 9, 2019

⌛ Testing commit 5143fe1 with merge 0583181...

bors added a commit that referenced this pull request Oct 9, 2019
New lint: suspicious_unary_op_formatting

fixes #4228

changelog: New lint: [`suspicious_unary_op_formatting`]
@bors
Copy link
Collaborator

bors commented Oct 9, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: flip1995
Pushing 0583181 to master...

@bors bors merged commit 5143fe1 into rust-lang:master Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggested lint for numeric literals with leading unary negation
4 participants