-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Make more tests rustfixable #4575
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
639cf27 to
0cbd51b
Compare
|
this PR will grow the longer folks take to review it 🤣 |
6408650 to
895c661
Compare
oli-obk
left a comment
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.
some nits, lgtm otherwise
clippy_lints/src/entry.rs
Outdated
| snippet(self.cx, params[1].span, "..")); | ||
|
|
||
| db.span_suggestion( | ||
| db.span_help( |
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.
use a label, otherwise we get the source printed twice
| let parent_id = cx.tcx.hir().get_parent_node(pat.hir_id); | ||
| if let Some(parent_node) = cx.tcx.hir().find(parent_id); | ||
| then { | ||
| // do not recurse within patterns, as they may have |
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.
comment cut off
| // do not recurse within patterns, as they may have | ||
| if let Node::Pat(_) = parent_node { | ||
| return; | ||
| }; |
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.
semicolon?
clippy_lints/src/non_copy_const.rs
Outdated
| "static".to_string(), | ||
| Applicability::MachineApplicable, | ||
| ); | ||
| db.span_help(const_kw_span, "make this a static item (maybe with lazy_static)"); |
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.
use span_label
412f1d1 to
926546e
Compare
|
Addressed. Need to fix the toolchain now. |
926546e to
c778b61
Compare
|
@bors r=oli-obk unsure if the osx issue has been fixed yet, might as well try |
|
📌 Commit c778b61 has been approved by |
|
💔 Test failed - status-appveyor |
2bfbb67 to
472745c
Compare
|
@bors r=oli-obk |
|
📌 Commit 472745c has been approved by |
|
🌲 The tree is currently closed for pull requests below priority 10, this pull request will be tested once the tree is reopened |
|
@bors treeclosed- I'm marking OSX as an allowed failure so that we can get a clippyup landed immediately after the cargo update. There's three PRs worth of breakages here and I'd rather not buffer futher, especially since there's another big breakage coming soon. |
|
er, wrong PR |
472745c to
eb1e9cd
Compare
|
@bors r=oli-obk |
|
📌 Commit eb1e9cd has been approved by |
eb1e9cd to
b94f2e8
Compare
|
@bors r=oli-obk |
|
📌 Commit b94f2e8 has been approved by |
|
@bors r=oli-obk |
|
📌 Commit 866338e has been approved by |
866338e to
49374a4
Compare
|
@bors r=oli-obk we now fix all the suggestions, updated PR body |
|
📌 Commit 49374a4 has been approved by |
|
☀️ Test successful - checks-travis, status-appveyor |
Fixes #3630
changelog: Improve suggestions for many lints in preparation for
cargo fix --clippyr? @phansch @yaahc