-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Update Clippy #81038
Update Clippy #81038
Commits on Dec 17, 2020
-
Configuration menu - View commit details
-
Copy full SHA for c06793b - Browse repository at this point
Copy the full SHA c06793bView commit details
Commits on Dec 28, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 469281c - Browse repository at this point
Copy the full SHA 469281cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 83a458a - Browse repository at this point
Copy the full SHA 83a458aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 275988c - Browse repository at this point
Copy the full SHA 275988cView commit details
Commits on Dec 30, 2020
-
Configuration menu - View commit details
-
Copy full SHA for af480a6 - Browse repository at this point
Copy the full SHA af480a6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0afe2db - Browse repository at this point
Copy the full SHA 0afe2dbView commit details -
Configuration menu - View commit details
-
Copy full SHA for b81111b - Browse repository at this point
Copy the full SHA b81111bView commit details
Commits on Dec 31, 2020
-
Fix blessing of test output in subdirectories
The core issue was the usage of `reference_file_path.file_name()`, which provided a non-existent path if the file to be updated was in a subdirectory. Instead we have to provide the whole path after 'tests/ui/' as the 'filename'. This part of the path is called `test_name` in the code now.
Configuration menu - View commit details
-
Copy full SHA for 6b37932 - Browse repository at this point
Copy the full SHA 6b37932View commit details -
This should make the code slightly more understandable
Configuration menu - View commit details
-
Copy full SHA for 6909055 - Browse repository at this point
Copy the full SHA 6909055View commit details
Commits on Jan 1, 2021
-
field_reassign_with_default: don't expand macros in suggestion
fixes rust-lang#6522 changelog: field_reassign_with_default: don't expand macros in lint suggestion (rust-lang#6522)
Configuration menu - View commit details
-
Copy full SHA for 5d48b91 - Browse repository at this point
Copy the full SHA 5d48b91View commit details
Commits on Jan 2, 2021
-
Configuration menu - View commit details
-
Copy full SHA for ba4bf4f - Browse repository at this point
Copy the full SHA ba4bf4fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1853f8b - Browse repository at this point
Copy the full SHA 1853f8bView commit details -
Auto merge of rust-lang#6520 - phansch:update-changelog, r=flip1995
Update CHANGELOG for Rust 1.50 changelog: none r? `@flip1995`
Configuration menu - View commit details
-
Copy full SHA for 78f6009 - Browse repository at this point
Copy the full SHA 78f6009View commit details -
Configuration menu - View commit details
-
Copy full SHA for 053afe4 - Browse repository at this point
Copy the full SHA 053afe4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9427e03 - Browse repository at this point
Copy the full SHA 9427e03View commit details -
Configuration menu - View commit details
-
Copy full SHA for d37ee6f - Browse repository at this point
Copy the full SHA d37ee6fView commit details -
Auto merge of rust-lang#6531 - matthiaskrgr:6522, r=ebroto
field_reassign_with_default: don't expand macros in suggestion fixes rust-lang#6522 changelog: field_reassign_with_default: don't expand macros in lint suggestion (rust-lang#6522)
Configuration menu - View commit details
-
Copy full SHA for 592f7eb - Browse repository at this point
Copy the full SHA 592f7ebView commit details -
Auto merge of rust-lang#6518 - ThibsG:CopyException, r=ebroto
Ensure `Copy` exception in trait definition for `wrong_self_conventio… Add a test case to ensure `Copy` exception is preserved also in trait definition, when passing `self` by value. Follow up of rust-lang#6316 changelog: none
Configuration menu - View commit details
-
Copy full SHA for a02806e - Browse repository at this point
Copy the full SHA a02806eView commit details
Commits on Jan 3, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 7b5f549 - Browse repository at this point
Copy the full SHA 7b5f549View commit details
Commits on Jan 4, 2021
-
Auto merge of rust-lang#6525 - phansch:fix-bless-in-subdirs, r=flip1995
Fix blessing of test output in subdirectories The core issue was the usage of `reference_file_path.file_name()`, which provided a non-existent path if the file to be updated was in a subdirectory. Instead we have to provide the whole path after 'tests/ui/' as the 'filename'. This part of the path is called `test_name` in the code now. changelog: none
Configuration menu - View commit details
-
Copy full SHA for 8951916 - Browse repository at this point
Copy the full SHA 8951916View commit details -
Configuration menu - View commit details
-
Copy full SHA for d141cdc - Browse repository at this point
Copy the full SHA d141cdcView commit details -
collapsible_if: split collapsible_else_if into its own lint so we can…
… enable/disable it particularly This splits up clippy::collapsible_if into collapsible_if for if x { if y { } } => if x && y { } and collapsible_else_if for if x { } else { if y { } } => if x { } else if y { } so that we can lint for only the latter but not the first if we desire. changelog: collapsible_if: split up linting for if x {} else { if y {} } into collapsible_else_if lint
Configuration menu - View commit details
-
Copy full SHA for 6dcec6a - Browse repository at this point
Copy the full SHA 6dcec6aView commit details -
Auto merge of rust-lang#6544 - matthiaskrgr:else_if, r=flip1995
collapsible_if: split collapsible_else_if into its own lint so we can enable/disable it particularly This splits up clippy::collapsible_if into collapsible_if for if x { if y { } } => if x && y { } and collapsible_else_if for if x { } else { if y { } } => if x { } else if y { } so that we can lint for only the latter but not the first if we desire. changelog: collapsible_if: split up linting for if x {} else { if y {} } into collapsible_else_if lint
Configuration menu - View commit details
-
Copy full SHA for dd1929e - Browse repository at this point
Copy the full SHA dd1929eView commit details -
Configuration menu - View commit details
-
Copy full SHA for ba87acb - Browse repository at this point
Copy the full SHA ba87acbView commit details -
Auto merge of rust-lang#6507 - bengsparks:lint/issue6410, r=flip1995
Needless Question Mark Lint Fixes rust-lang#6410, i.e the needless question mark lint changelog: [`needless_question_mark`] New lint
Configuration menu - View commit details
-
Copy full SHA for ae9ae97 - Browse repository at this point
Copy the full SHA ae9ae97View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7acfa44 - Browse repository at this point
Copy the full SHA 7acfa44View commit details -
Configuration menu - View commit details
-
Copy full SHA for cbbb188 - Browse repository at this point
Copy the full SHA cbbb188View commit details -
Auto merge of rust-lang#6548 - camsteffen:bless-internal, r=flip1995
Add ui-internal to cargo dev bless changelog: internal
Configuration menu - View commit details
-
Copy full SHA for 445eb99 - Browse repository at this point
Copy the full SHA 445eb99View commit details -
Configuration menu - View commit details
-
Copy full SHA for bc97f5d - Browse repository at this point
Copy the full SHA bc97f5dView commit details -
Configuration menu - View commit details
-
Copy full SHA for a8d47b4 - Browse repository at this point
Copy the full SHA a8d47b4View commit details -
Auto merge of rust-lang#6538 - Jarcho:vec_init_then_push, r=llogiq
New lint: vec_init_then_push fixes: rust-lang#1483 This will trigger on `new`, `default`, and `with_capacity` when the given capacity is less than or equal to the number of push calls. Is there anything else this should trigger on? changelog: Added lint: `vec_init_then_push`
Configuration menu - View commit details
-
Copy full SHA for 976850b - Browse repository at this point
Copy the full SHA 976850bView commit details -
which checks for `as` casts between raw pointers without changing its mutability and suggest replacing it with `pointer::cast`.
Configuration menu - View commit details
-
Copy full SHA for 4b478a5 - Browse repository at this point
Copy the full SHA 4b478a5View commit details -
Configuration menu - View commit details
-
Copy full SHA for dfa5d7e - Browse repository at this point
Copy the full SHA dfa5d7eView commit details
Commits on Jan 5, 2021
-
Auto merge of rust-lang#6547 - camsteffen:curse-outdated, r=phansch
Curse outdated test output changelog: internal Change `cargo dev bless` to only include test output that was generated since the last build of clippy. This is especially useful when running tests with `TESTNAME=...`. The feature may be disabled by `cargo dev bless --ignore-timestamp`.
Configuration menu - View commit details
-
Copy full SHA for dd52066 - Browse repository at this point
Copy the full SHA dd52066View commit details -
Auto merge of rust-lang#6513 - nahuakang:fix/empty_enum_lint_never_ty…
…pe, r=flip1995 Fix: Empty enum never type suggested only if the feature is enabled This PR addresses [Issue 6422](rust-lang/rust-clippy#6422). Instead of always recommending `never type` for empty enums, Clippy would only recommend [the lint](https://rust-lang.github.io/rust-clippy/master/index.html#empty_enum) if [LatePass.TyCtxt](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/context/struct.TyCtxt.html) has `features().never_type` enabled. - \[ ] Followed [lint naming conventions][lint_naming] - \[x] Added passing UI tests (including committed `.stderr` file) - \[x] `cargo test` passes locally - \[x] Executed `cargo dev update_lints` - \[x] Added lint documentation - \[x] Run `cargo dev fmt` --- *Please write a short comment explaining your change (or "none" for internal only changes)* changelog: Only trigger [`empty_enum`] lint if `never_type` feature is enabled.
Configuration menu - View commit details
-
Copy full SHA for 311186b - Browse repository at this point
Copy the full SHA 311186bView commit details -
Auto merge of rust-lang#6542 - rail-rain:ptr_as_ptr, r=flip1995
Add a new lint `ptr_as_ptr` This PR adds a new lint `ptr_as_ptr` which checks for `as` casts between raw pointers without changing its mutability and suggest replacing it with `pointer::cast`. Closes rust-lang#5890. Open question: should this lint be `pedantic` or `style`? I set it `pedantic` for now because the original post suggests using it, but I think the lint also fits well to `style`. --- changelog: New lint `ptr_as_ptr`
Configuration menu - View commit details
-
Copy full SHA for a6b72d3 - Browse repository at this point
Copy the full SHA a6b72d3View commit details -
* Renames `sym.rs` to `sym_helper.rs` so that the `sym as rustc_sym` is no longer needed. * Removes one needless `symbol` from a path
Configuration menu - View commit details
-
Copy full SHA for ea885d9 - Browse repository at this point
Copy the full SHA ea885d9View commit details -
Auto merge of rust-lang#6551 - phansch:tiny-symbol-cleanup, r=flip1995
Tiny Symbol cleanup * Renames `sym.rs` to `sym_helper.rs` so that the `sym as rustc_sym` is no longer needed. * Removes one needless `symbol` from a path changelog: none
Configuration menu - View commit details
-
Copy full SHA for 42b9e92 - Browse repository at this point
Copy the full SHA 42b9e92View commit details -
Configuration menu - View commit details
-
Copy full SHA for a8825e9 - Browse repository at this point
Copy the full SHA a8825e9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 92f2bbb - Browse repository at this point
Copy the full SHA 92f2bbbView commit details
Commits on Jan 6, 2021
-
Auto merge of rust-lang#6553 - phansch:field-reassign-with-default-ma…
…cros, r=flip1995 Fix derive and macro related false positives in `field_reassign_with_default` Closes rust-lang#6545 changelog: Fix derive and macro related false positives in [`field_reassign_with_default`]
Configuration menu - View commit details
-
Copy full SHA for efccfe8 - Browse repository at this point
Copy the full SHA efccfe8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8a45ffa - Browse repository at this point
Copy the full SHA 8a45ffaView commit details -
Auto merge of rust-lang#6554 - sozysozbot:master, r=flip1995
Fix typo: `which which can be` -> `which can be` Fixed a typo in the explanation of https://rust-lang.github.io/rust-clippy/master/index.html#large_types_passed_by_value : `which which can be` -> `which can be` changelog: none
Configuration menu - View commit details
-
Copy full SHA for 8e5c5a6 - Browse repository at this point
Copy the full SHA 8e5c5a6View commit details
Commits on Jan 7, 2021
-
Configuration menu - View commit details
-
Copy full SHA for f50ded0 - Browse repository at this point
Copy the full SHA f50ded0View commit details -
Change env var used for testing Clippy
This changes the variable used for testing Clippy in the internal test suite: ``` CLIPPY_TESTS -> __CLIPPY_INTERNAL_TESTS ``` `CLIPPY_TESTS` is understandably used in environments of Clippy users, so we shouldn't use it in our test suite.
Configuration menu - View commit details
-
Copy full SHA for 547ce0d - Browse repository at this point
Copy the full SHA 547ce0dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2b3c0ad - Browse repository at this point
Copy the full SHA 2b3c0adView commit details -
Auto merge of rust-lang#6558 - stanislav-tkach:patch-2, r=flip1995
Fix typo: `irrevelent` -> `irrelevant` changelog: none
Configuration menu - View commit details
-
Copy full SHA for e15bef9 - Browse repository at this point
Copy the full SHA e15bef9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7d42172 - Browse repository at this point
Copy the full SHA 7d42172View commit details -
Configuration menu - View commit details
-
Copy full SHA for aa9adbf - Browse repository at this point
Copy the full SHA aa9adbfView commit details
Commits on Jan 8, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 0e14a75 - Browse repository at this point
Copy the full SHA 0e14a75View commit details -
Move
is_hir_ty_cfg_dependant
toutil
,add stuff on pointer::cast` to the document for `cast_ptr_alignment` and fix line numbers in the test.
Configuration menu - View commit details
-
Copy full SHA for ee9b47d - Browse repository at this point
Copy the full SHA ee9b47dView commit details -
Auto merge of rust-lang#6566 - giraffate:reduce_the_span_in_from_over…
…_into, r=Manishearth Reduce the span in `from_over_into` to impl header A follow up of rust-lang/rust-clippy#6476 (comment) > That item might be quite large. We may want to reduce the span to the `impl` header. changelog: none
Configuration menu - View commit details
-
Copy full SHA for 2950c8e - Browse repository at this point
Copy the full SHA 2950c8eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 24c700b - Browse repository at this point
Copy the full SHA 24c700bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 121c65f - Browse repository at this point
Copy the full SHA 121c65fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 76ccfb4 - Browse repository at this point
Copy the full SHA 76ccfb4View commit details -
Configuration menu - View commit details
-
Copy full SHA for cc26919 - Browse repository at this point
Copy the full SHA cc26919View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7871eba - Browse repository at this point
Copy the full SHA 7871ebaView commit details -
Auto merge of rust-lang#6569 - camsteffen:symbol-comparison, r=Manish…
…earth Internal lint symbol comparisons changelog: none * Added awareness of `rustc_span::symbol::kw::*` symbols. * Compare with const symbols: `symbol.as_str() == "self"` => `symbol == kw::SelfLower` * Don't compare symbols by string: `a.as_str() == b.as_str()` => `a == b` * Lint comparing with `to_ident_string` or `to_string` instead of `Symbol::as_str`.
Configuration menu - View commit details
-
Copy full SHA for 68bcd20 - Browse repository at this point
Copy the full SHA 68bcd20View commit details
Commits on Jan 9, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 8a6fea4 - Browse repository at this point
Copy the full SHA 8a6fea4View commit details -
Auto merge of rust-lang#6571 - ThibsG:BoxedLocalTrait, r=phansch
Fix FP for `boxed_local` lint in default trait fn impl Fix FP on default trait function implementation on `boxed_local` lint. Maybe I checked too much when looking if `self` is carrying `Self` in its bound type. I can't find a good test case for this, so it could be too much conservative. Let me know if you think only detecting `self` parameter is enough. Fixes: rust-lang#4804 changelog: none
Configuration menu - View commit details
-
Copy full SHA for ee0598e - Browse repository at this point
Copy the full SHA ee0598eView commit details -
Auto merge of rust-lang#6565 - giraffate:small_fixes_of_doc_in_needle…
…ss_question_mark, r=phansch Small fixes of doc in `needless_question_mark` changelog: none
Configuration menu - View commit details
-
Copy full SHA for 583715f - Browse repository at this point
Copy the full SHA 583715fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9e45a23 - Browse repository at this point
Copy the full SHA 9e45a23View commit details
Commits on Jan 10, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 2c6dc88 - Browse repository at this point
Copy the full SHA 2c6dc88View commit details
Commits on Jan 11, 2021
-
Auto merge of rust-lang#6575 - flip1995:stop_linting_deps, r=Manishearth
Change env var used for testing Clippy This changes the variable used for testing Clippy in the internal test suite: ``` CLIPPY_TESTS -> __CLIPPY_INTERNAL_TESTS ``` `CLIPPY_TESTS` is understandably used in environments of Clippy users, so we shouldn't use it in our test suite. changelog: Fix oversight which caused Clippy to lint deps in some environments. Once again fixes rust-lang/rust-clippy#3874
Configuration menu - View commit details
-
Copy full SHA for 1eed27f - Browse repository at this point
Copy the full SHA 1eed27fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 53f8731 - Browse repository at this point
Copy the full SHA 53f8731View commit details -
Auto merge of rust-lang#6557 - rail-rain:extending_cast_ptr_alignment…
…, r=phansch Catch `pointer::cast` too in `cast_ptr_alignment` Fixes rust-lang#4708 Although there were some discussion in the issue, this PR implements the original feature. I think `cast_ptr_alignment` should exist as it is, separated from `ptr_as_ptr`. --- changelog: Extend `cast_ptr_alignment` lint for the `pointer::cast` method
Configuration menu - View commit details
-
Copy full SHA for 7f4599a - Browse repository at this point
Copy the full SHA 7f4599aView commit details
Commits on Jan 12, 2021
-
Auto merge of rust-lang#6462 - flip1995:roadmap, r=flip1995,llogiq,ki…
…llercup,Manishearth,oli-obk,matthiaskrgr,phansch,mikerite,mcarton,yaahc,ebroto Roadmap for 2021 [Rendered](https://github.com/flip1995/rust-clippy/blob/roadmap/doc/roadmap-2021.md) This is the first time Clippy gets its own roadmap. The reason for this roadmap is, that with the Rust language growing, also Clippy is growing. With this keeping track of and implementing bigger projects gets quite hard. This roadmap should help in exactly this regard. After having the approval of this roadmap by the Clippy team, we want to know from the community: - What do you think in general about this roadmap? - Are there any pain points in Clippy, that should be included here? - What of the points listed here has the highest priority for you? We're looking forward to getting your feedback! changelog: Add roadmap for Clippy 2021 r? `@rust-lang/clippy`
Configuration menu - View commit details
-
Copy full SHA for 13ca5c8 - Browse repository at this point
Copy the full SHA 13ca5c8View commit details
Commits on Jan 13, 2021
-
Configuration menu - View commit details
-
Copy full SHA for ea02849 - Browse repository at this point
Copy the full SHA ea02849View commit details -
Separate out a
hir::Impl
structThis makes it possible to pass the `Impl` directly to functions, instead of having to pass each of the many fields one at a time. It also simplifies matches in many cases.
Configuration menu - View commit details
-
Copy full SHA for dfb41f4 - Browse repository at this point
Copy the full SHA dfb41f4View commit details -
Auto merge of rust-lang#6584 - giraffate:make_references_to_issues_li…
…nks, r=llogiq Make a reference a link in doc I think it's incovenient that references in doc are just a text. changelog: none
Configuration menu - View commit details
-
Copy full SHA for 00586df - Browse repository at this point
Copy the full SHA 00586dfView commit details -
Auto merge of rust-lang#77524 - Patryk27:fixes/66228, r=estebank
Rework diagnostics for wrong number of generic args (fixes rust-lang#66228 and rust-lang#71924) This PR reworks the `wrong number of {} arguments` message, so that it provides more details and contextual hints.
Configuration menu - View commit details
-
Copy full SHA for dcd8c8e - Browse repository at this point
Copy the full SHA dcd8c8eView commit details
Commits on Jan 14, 2021
-
Auto merge of rust-lang#79328 - c410-f3r:hir-if, r=matthewjasper
Reintroduce hir::ExprKind::If Basically copied and paste rust-lang#59288/rust-lang/rust-clippy#4080 with some modifications. The vast majority of tests were fixed and now there are only a few remaining. Since I am still unable to figure out the missing pieces, any help with the following list is welcome. - [ ] **Unnecessary `typeck` exception**: [Cheated on this one to make CI green.](https://github.com/rust-lang/rust/pull/79328/files#diff-3faee9ba23fc54a12b7c43364ba81f8c5660045c7e1d7989a02a0cee1c5b2051) - [x] **Incorrect span**: [Span should reference `then` and `else` separately.](https://github.com/rust-lang/rust/pull/79328/files#diff-cf2c46e82222ee4b1037a68fff8a1af3c4f1de7a6b3fd798aacbf3c0475abe3d) - [x] **New note regarding `assert!`**: [Modified but not "wrong". Maybe can be a good thing?](https://github.com/rust-lang/rust/pull/79328/files#diff-9e0d7c89ed0224e2b62060c957177c27db43c30dfe3c2974cb6b5091cda9cfb5) - [x] **Inverted report location**: [Modified but not "wrong". Locations were inverted.](https://github.com/rust-lang/rust/pull/79328/files#diff-f637ce7c1f68d523a165aa9651765df05e36c4d7d279194b1a6b28b48a323691) - [x] **`src/test/ui/point-to-type-err-cause-on-impl-trait-return.rs` has weird errors**: [Not sure why this is happening.](https://github.com/rust-lang/rust/pull/79328/files#diff-c823c09660f5b112f95e97e8ff71f1797b6c7f37dbb3d16f8e98bbaea8072e95) - [x] **Missing diagnostic**: [???](https://github.com/rust-lang/rust/pull/79328/files#diff-6b8ab09360d725ba4513933827f9796b42ff9522b0690f80b76de067143af2fc)
Configuration menu - View commit details
-
Copy full SHA for 7b3af41 - Browse repository at this point
Copy the full SHA 7b3af41View commit details
Commits on Jan 15, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 9bd037d - Browse repository at this point
Copy the full SHA 9bd037dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0c5ba9a - Browse repository at this point
Copy the full SHA 0c5ba9aView commit details -
Configuration menu - View commit details
-
Copy full SHA for f18cf82 - Browse repository at this point
Copy the full SHA f18cf82View commit details -
Auto merge of rust-lang#6586 - flip1995:rustup, r=flip1995
Rustup r? `@ghost` changelog: FP fix: [`needless_return`] no longer triggers inside macros.
Configuration menu - View commit details
-
Copy full SHA for 953f024 - Browse repository at this point
Copy the full SHA 953f024View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3e236b3 - Browse repository at this point
Copy the full SHA 3e236b3View commit details