-
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 #113686
Update Clippy #113686
Commits on Jun 18, 2023
-
Configuration menu - View commit details
-
Copy full SHA for c5a9adc - Browse repository at this point
Copy the full SHA c5a9adcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ab1e8e - Browse repository at this point
Copy the full SHA 9ab1e8eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 26ac76c - Browse repository at this point
Copy the full SHA 26ac76cView commit details -
Configuration menu - View commit details
-
Copy full SHA for b0dfecd - Browse repository at this point
Copy the full SHA b0dfecdView commit details
Commits on Jun 20, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 1b6738b - Browse repository at this point
Copy the full SHA 1b6738bView commit details
Commits on Jun 26, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 7bd8ab7 - Browse repository at this point
Copy the full SHA 7bd8ab7View commit details -
Configuration menu - View commit details
-
Copy full SHA for d69c4f5 - Browse repository at this point
Copy the full SHA d69c4f5View commit details
Commits on Jun 27, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 0cd8bbc - Browse repository at this point
Copy the full SHA 0cd8bbcView commit details
Commits on Jun 28, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 57923c3 - Browse repository at this point
Copy the full SHA 57923c3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4340a8a - Browse repository at this point
Copy the full SHA 4340a8aView commit details
Commits on Jun 30, 2023
-
Don't lint manual_let_else in cases where the question mark operator …
…would work Also, lint question_mark for `let...else` clauses that can be simplified to use `?`. This lint isn't perfect as it doesn't support the unstable try blocks.
Configuration menu - View commit details
-
Copy full SHA for 86391ab - Browse repository at this point
Copy the full SHA 86391abView commit details -
Configuration menu - View commit details
-
Copy full SHA for c6be621 - Browse repository at this point
Copy the full SHA c6be621View commit details -
Configuration menu - View commit details
-
Copy full SHA for 20dfaba - Browse repository at this point
Copy the full SHA 20dfabaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2f7f139 - Browse repository at this point
Copy the full SHA 2f7f139View commit details
Commits on Jul 1, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 420f3d1 - Browse repository at this point
Copy the full SHA 420f3d1View commit details
Commits on Jul 2, 2023
-
Auto merge of rust-lang#112718 - oli-obk:SIMD-destructure_mir_const, …
…r=cjgillot Make simd_shuffle_indices use valtrees This removes the second-to-last user of the `destructure_mir_constant` query. So in a follow-up we can remove the query and just move the query provider function directly into pretty printing (which is the last user). cc `@rust-lang/clippy` there's a small functional change, but I think it is correct?
Configuration menu - View commit details
-
Copy full SHA for bb33e03 - Browse repository at this point
Copy the full SHA bb33e03View commit details -
Configuration menu - View commit details
-
Copy full SHA for 885a182 - Browse repository at this point
Copy the full SHA 885a182View commit details -
Auto merge of rust-lang#11058 - Centri3:typos, r=xFrednet
Fix typos Just a couple misc typos I found changelog: none
Configuration menu - View commit details
-
Copy full SHA for 1990b72 - Browse repository at this point
Copy the full SHA 1990b72View commit details -
Auto merge of rust-lang#11053 - Alexendoo:ci-build-tests, r=flip1995
Use `cargo build --tests` in CI I noticed that we run a `cargo build` but end up downloading/building a bunch of deps after that for tests in CI https://github.com/rust-lang/rust-clippy/actions/runs/5426673277/jobs/9869019973#step:6:12 https://github.com/rust-lang/rust-clippy/actions/runs/5426673277/jobs/9869019973#step:7:11 This builds the tests in the build step too, it may speed up runs by downloading/building more in parallel changelog: none
Configuration menu - View commit details
-
Copy full SHA for 17a48c2 - Browse repository at this point
Copy the full SHA 17a48c2View commit details -
Configuration menu - View commit details
-
Copy full SHA for cb3ecf7 - Browse repository at this point
Copy the full SHA cb3ecf7View commit details -
Configuration menu - View commit details
-
Copy full SHA for ba1ffec - Browse repository at this point
Copy the full SHA ba1ffecView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4aa4fec - Browse repository at this point
Copy the full SHA 4aa4fecView commit details -
Configuration menu - View commit details
-
Copy full SHA for e29a5ac - Browse repository at this point
Copy the full SHA e29a5acView commit details -
Auto merge of rust-lang#11061 - Alexendoo:let-and-return-closures, r=…
…llogiq `let_and_return`: lint 'static lifetimes, don't lint borrows in closures Fixes rust-lang#11056 Now also ignores functions returning `'static` lifetimes, since I noticed the `stdin.lock()` example was still being linted but doesn't need to be since rust-lang#93965 changelog: none
Configuration menu - View commit details
-
Copy full SHA for 83d0682 - Browse repository at this point
Copy the full SHA 83d0682View commit details -
Auto merge of rust-lang#10920 - blyxyas:speedtest, r=llogiq
Add `SPEEDTEST` In the `master` branch, we currently don't have any way to test the performance of a single lint in changes. This PR adds `SPEEDTEST`, the environment variable which lets you do a speed test on a lint / category of tests with various configuration options. Maybe we should merge this with `lintcheck` 🤔 See the book page for more information. changelog:none
Configuration menu - View commit details
-
Copy full SHA for ea4ca22 - Browse repository at this point
Copy the full SHA ea4ca22View commit details -
Configuration menu - View commit details
-
Copy full SHA for 555ceb8 - Browse repository at this point
Copy the full SHA 555ceb8View commit details -
Auto merge of rust-lang#11069 - y21:issue11063, r=Alexendoo
[`missing_fields_in_debug`]: make sure self type is an adt Fixes rust-lang#11063, another ICE that can only happen in core. This lint needs the `DefId` of the implementor to get its fields, but that ICEs if the implementor does not have a `DefId` (as is the case with primitive types, e.g. `impl Debug for bool`), which is where this ICE comes from. This PR changes the check I added in rust-lang#10897 to be more... robust against `Debug` implementations we don't want to lint. Instead of just checking if the self type is a type parameter and "special casing" one specific case we don't want to lint, we should probably rather just check that the self type is either a struct, an enum or a union and only then continue. That prevents weird edge cases like this one that can only happen in core. Again, I don't know if it's even possible to add a test case for this since one cannot implement `Debug` for primitive types outside of the crate that defined `Debug` (core). I did make sure that this PR no longer ICEs on `impl<T> Debug for T` and `impl Debug for bool`. Maybe writing such a test is possible with `#![no_core]` and then re-defining the `Debug` trait or something like that...? changelog: [`missing_fields_in_debug`]: make sure self type is an adt (fixes an ICE in core) r? `@Alexendoo` (reviewed the last PRs for this lint)
Configuration menu - View commit details
-
Copy full SHA for 4752466 - Browse repository at this point
Copy the full SHA 4752466View commit details
Commits on Jul 3, 2023
-
Auto merge of rust-lang#10987 - y21:type_id_on_box, r=llogiq
new lint: `type_id_on_box` Closes rust-lang#7687. A new lint that detects calling `.type_id()` on `Box<dyn Any>` (and not on the underlying `dyn Any`), which can make up for some pretty confusing bugs! changelog: new lint: [`type_id_on_box`]
Configuration menu - View commit details
-
Copy full SHA for c46ddeb - Browse repository at this point
Copy the full SHA c46ddebView commit details -
Don't suppress manual_let_else if question_mark is allowed
If question_mark is allowed, there is no overlap any more, so we can just not suppress it.
Configuration menu - View commit details
-
Copy full SHA for 6990eaa - Browse repository at this point
Copy the full SHA 6990eaaView commit details -
Configuration menu - View commit details
-
Copy full SHA for d80581c - Browse repository at this point
Copy the full SHA d80581cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 75c339c - Browse repository at this point
Copy the full SHA 75c339cView commit details -
Auto merge of rust-lang#11077 - y21:issue11076, r=Manishearth
[`arc_with_non_send_sync`]: don't lint if type has nested type parameters Fixes rust-lang#11076 changelog: [`arc_with_non_send_sync`]: don't lint if type has nested type parameters r? `@Manishearth`
Configuration menu - View commit details
-
Copy full SHA for 2b03bb0 - Browse repository at this point
Copy the full SHA 2b03bb0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9a58107 - Browse repository at this point
Copy the full SHA 9a58107View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1f77f8c - Browse repository at this point
Copy the full SHA 1f77f8cView commit details -
Auto merge of rust-lang#11081 - y21:issue11075, r=Manishearth
[`useless_vec`]: use the source span for initializer Fixes rust-lang#11075. changelog: [`useless_vec`]: use the source span for the initializer expression when inside of a macro
Configuration menu - View commit details
-
Copy full SHA for a959061 - Browse repository at this point
Copy the full SHA a959061View commit details -
Auto merge of rust-lang#10924 - est31:manual_let_else_question_mark, …
…r=Centri3,flip1995,Manishearth Don't lint manual_let_else in cases where ? would work Don't lint `manual_let_else` where the question mark operator `?` would be sufficient, that is, mostly in cases like: ```Rust let v = if let Some(v) = ex { v } else { return None }; ``` Also, this PR emits the `question_mark` lint for `let...else` patterns that could be written with `?` (also, only `return None` like cases). ``` changelog: [`manual_let_else`]: don't lint in cases where question_mark already lints changelog: [`question_mark`]: lint for `let Some(...) = ex else { return None };` ``` Fixes rust-lang#8755
Configuration menu - View commit details
-
Copy full SHA for 3f17c5c - Browse repository at this point
Copy the full SHA 3f17c5cView commit details -
Auto merge of rust-lang#11078 - Centri3:11068, r=llogiq
[`needless_raw_string_hashes`]: Only reset hashes needed if not following quote Fixes rust-lang#11068 changelog: none
Configuration menu - View commit details
-
Copy full SHA for ba3bd8f - Browse repository at this point
Copy the full SHA ba3bd8fView commit details -
Configuration menu - View commit details
-
Copy full SHA for b4549c5 - Browse repository at this point
Copy the full SHA b4549c5View commit details -
Configuration menu - View commit details
-
Copy full SHA for b41fc67 - Browse repository at this point
Copy the full SHA b41fc67View commit details -
Configuration menu - View commit details
-
Copy full SHA for a43bea1 - Browse repository at this point
Copy the full SHA a43bea1View commit details -
Configuration menu - View commit details
-
Copy full SHA for c62c7fa - Browse repository at this point
Copy the full SHA c62c7faView commit details -
Configuration menu - View commit details
-
Copy full SHA for dd3e00f - Browse repository at this point
Copy the full SHA dd3e00fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 33adfcd - Browse repository at this point
Copy the full SHA 33adfcdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8fad54e - Browse repository at this point
Copy the full SHA 8fad54eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 85f535b - Browse repository at this point
Copy the full SHA 85f535bView commit details -
Auto merge of rust-lang#11094 - y21:issue11084, r=Alexendoo
[`useless_vec`]: add more tests and don't lint inside of macros Closes rust-lang#11084. I realized that the fix I added in rust-lang#11081 itself also causes an error in a suggestion when inside of a macro. Example: ```rs macro_rules! x { () => { for _ in vec![1, 2] {} } } x!(); ``` Here it would suggest replacing `vec![1, 2]` with `[x!()]`, because that's what the source callsite is (reminder: it does this to get the correct span of `x!()` for code like `for _ in vec![x!()]`), but that's wrong when *inside* macros, so I decided to make it not lint if the whole loop construct is inside a macro to avoid this issue. changelog: [`useless_vec`]: add more tests and don't lint inside of macros r? `@Alexendoo` since these were your tests, I figured it makes most sense to assign you
Configuration menu - View commit details
-
Copy full SHA for 3f4e599 - Browse repository at this point
Copy the full SHA 3f4e599View commit details
Commits on Jul 4, 2023
-
Configuration menu - View commit details
-
Copy full SHA for f048f73 - Browse repository at this point
Copy the full SHA f048f73View commit details
Commits on Jul 5, 2023
-
Auto merge of rust-lang#10970 - y21:read_line_without_trim, r=giraffate
new lint: `read_line_without_trim` This adds a new lint that checks for calls to `Stdin::read_line` with a reference to a string that is then attempted to parse into an integer type without first trimming it, which is always going to fail at runtime. This is something that I've seen happen a lot to beginners, because it's easy to run into when following the example of chapter 2 in the book where it shows how to program a guessing game. It would be nice if we could point beginners to clippy and tell them "let's see what clippy has to say" and have clippy explain to them why it fails 👀 I think this lint can later be "generalized" to work not just for `Stdin` but also any `BufRead` (which seems to be where the guarantee about the trailing newline comes from) and also, matching/comparing it to a string slice that doesn't end in a newline character (e.g. `input == "foo"` is always going to fail) changelog: new lint: [`read_line_without_trim`]
Configuration menu - View commit details
-
Copy full SHA for 1e656d8 - Browse repository at this point
Copy the full SHA 1e656d8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4062418 - Browse repository at this point
Copy the full SHA 4062418View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6868c0a - Browse repository at this point
Copy the full SHA 6868c0aView commit details -
Configuration menu - View commit details
-
Copy full SHA for a4f9914 - Browse repository at this point
Copy the full SHA a4f9914View commit details -
Configuration menu - View commit details
-
Copy full SHA for f945351 - Browse repository at this point
Copy the full SHA f945351View commit details -
Configuration menu - View commit details
-
Copy full SHA for cbe4682 - Browse repository at this point
Copy the full SHA cbe4682View commit details
Commits on Jul 6, 2023
-
Auto merge of rust-lang#113291 - oli-obk:pretty_print_mir_const, r=Ra…
…lfJung Specialize `try_destructure_mir_constant` for its sole user (pretty printing) We can't remove the query, as we need to invoke it from rustc_middle, but can only implement it in mir interpretation/const eval. r? `@RalfJung` for a first round. While we could move all the logic into pretty printing, that would end up duplicating a bit of code with const eval, which doesn't seem great either.
Configuration menu - View commit details
-
Copy full SHA for 8aca068 - Browse repository at this point
Copy the full SHA 8aca068View commit details -
Auto merge of rust-lang#113377 - BoxyUwU:move_ty_ctors_to_ty, r=compi…
…ler-errors Move `TyCtxt::mk_x` to `Ty::new_x` where applicable Part of rust-lang/compiler-team#616 turns out there's a lot of places we construct `Ty` this is a ridiculously huge PR :S r? `@oli-obk`
Configuration menu - View commit details
-
Copy full SHA for 8c70e52 - Browse repository at this point
Copy the full SHA 8c70e52View commit details -
Auto merge of rust-lang#11111 - Alexendoo:regex-def-paths, r=giraffate
Fix regex lints for regex 1.9.0 regex 1.9.0 was [just released](https://blog.burntsushi.net/regex-internals/), which changes where the types are defined. Instead of updating the definitions to the ones in 1.9.0 this PR uses [`def_path_def_ids`](https://doc.rust-lang.org/nightly/nightly-rustc/clippy_utils/fn.def_path_def_ids.html) on the canonical paths so that we don't have to worry about third party crate internals This means that it still works with older regex versions too, and will for any future layout changes. I tested it with 1.8.4 and 1.9.0 changelog: [`INVALID_REGEX`], [`TRIVIAL_REGEX`]: now works with regex 1.9.0
Configuration menu - View commit details
-
Copy full SHA for dd8e44c - Browse repository at this point
Copy the full SHA dd8e44cView commit details
Commits on Jul 7, 2023
-
Configuration menu - View commit details
-
Copy full SHA for f12edfd - Browse repository at this point
Copy the full SHA f12edfdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5949f76 - Browse repository at this point
Copy the full SHA 5949f76View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4939a71 - Browse repository at this point
Copy the full SHA 4939a71View commit details -
Auto merge of rust-lang#11104 - Alexendoo:arc-with-non-send-sync, r=C…
…entri3 `arc_with_non_send_sync`: reword and move to `suspicious` Fixes rust-lang#11079 changelog: [`arc_with_non_send_sync`]: move to complexity
Configuration menu - View commit details
-
Copy full SHA for 26edd5a - Browse repository at this point
Copy the full SHA 26edd5aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2865526 - Browse repository at this point
Copy the full SHA 2865526View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5cc0c04 - Browse repository at this point
Copy the full SHA 5cc0c04View commit details -
Configuration menu - View commit details
-
Copy full SHA for c927912 - Browse repository at this point
Copy the full SHA c927912View commit details -
Rename
adjustment::PointerCast
and variants using it to `PointerCoe……rcion` It makes it sound like the `ExprKind` and `Rvalue` are supposed to represent all pointer related casts, when in reality their just used to share a some enum variants. Make it clear there these are only coercion to make it clear why only some pointer related "casts" are in the enum.
Configuration menu - View commit details
-
Copy full SHA for b5ac726 - Browse repository at this point
Copy the full SHA b5ac726View commit details -
Comments out the C string literals due to rust-lang#113334 Fixes rust-lang/rust-clippy#11121
Configuration menu - View commit details
-
Copy full SHA for 87373d7 - Browse repository at this point
Copy the full SHA 87373d7View commit details -
Pass correct substs to
implements_trait
inincorrect_impls
`Copy<T>` does in fact not exist. The substs on the trait_ref contain the `Self` type of the impl as the first parameter, so passing that to `implements_trait`, which then nicely prepends the `Self` type for us does not end will.
Configuration menu - View commit details
-
Copy full SHA for 5df1f66 - Browse repository at this point
Copy the full SHA 5df1f66View commit details -
Auto merge of rust-lang#11122 - Nilstrieb:SUBSTITUTION-INITIATED, r=f…
…lip1995 Pass correct substs to `implements_trait` in `incorrect_impls` `Copy<T>` does in fact not exist. The substs on the trait_ref contain the `Self` type of the impl as the first parameter, so passing that to `implements_trait`, which then nicely prepends the `Self` type for us does not end will. fixes rust-lang#11121 The assertions requires debug assertions inside rustc, which is probably why it didn't fire here. I tested the change locally in rust-lang/rust and it did not ICE anymore. cc `@xFrednet` `@Centri3` changelog: [`incorrect_impls`]: fix confusion about generic parameters
Configuration menu - View commit details
-
Copy full SHA for 2eff2f2 - Browse repository at this point
Copy the full SHA 2eff2f2View commit details -
Auto merge of rust-lang#11114 - Alexendoo:changelog-prs-fetch, r=xFre…
…dnet Fix changelog PR listings, create them automatically in `fetch_prs_between.sh` changelog: none `fetch_prs_between.sh` now finds the date of the newest and oldest merges from GitHub to use in the range, this does add a dependency on https://github.com/cli/cli It also no longer prints rollups/merges that come from rustc, so only clippy changes should be printed r? `@xFrednet` cc rust-lang#10847
Configuration menu - View commit details
-
Copy full SHA for 3a1fc26 - Browse repository at this point
Copy the full SHA 3a1fc26View commit details
Commits on Jul 8, 2023
-
Auto merge of rust-lang#113376 - Nilstrieb:pointer-coercions-are-not-…
…casts-because-that-sounds-way-to-general-aaaa, r=oli-obk Rename `adjustment::PointerCast` and variants using it to `PointerCoercion` It makes it sounds like the `ExprKind` and `Rvalue` are supposed to represent all pointer related casts, when in reality their just used to share a little enum variants. Make it clear there these are only coercions and that people who see this and think "why are so many pointer related casts not in these variants" aren't insane. This enum was added in rust-lang#59987. I'm not sure whether the variant sharing is actually worth it, but this at least makes it less confusing. r? oli-obk
Configuration menu - View commit details
-
Copy full SHA for 1816caa - Browse repository at this point
Copy the full SHA 1816caaView commit details -
Delete
to_string_in_format_args_incremental.rs
It fails CI and passes locally. It passes random directores in `-Cincremental` so maybe something's up. It shouldn't block us here.
Configuration menu - View commit details
-
Copy full SHA for 31d50a6 - Browse repository at this point
Copy the full SHA 31d50a6View commit details -
Auto merge of rust-lang#113450 - Nilstrieb:src/bootstrap/test.rs, r=f…
…lip1995 Fail the build if clippy tests don't pass This was removed in rust-lang@de69d55#diff-8479eab02701e686aedb15b567dc8fc31220c6e4efb9565ccc9d662b7fee2214 which caused CI to ignore clippy failures. This adds back the exit, which should cause CI to fail again if a test is broken (like right now, as clippy tests are broken on master). Also see https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/CI.20doesn't.20care.20about.20clippy.20test.20failures.20but.20only.20sometime r? flip1995
Configuration menu - View commit details
-
Copy full SHA for b485e4f - Browse repository at this point
Copy the full SHA b485e4fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2a1fd22 - Browse repository at this point
Copy the full SHA 2a1fd22View commit details -
rename to
manual_partial_ord_and_ord_impl
cargo dev fmt cargo test passes cargo test passes refactor a lil Update bool_comparison.stderr heavily refactor + bump `clippy::version` refactor refactor check bounds to increase accuracy, and add todos
Configuration menu - View commit details
-
Copy full SHA for 004e89d - Browse repository at this point
Copy the full SHA 004e89dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 844afbf - Browse repository at this point
Copy the full SHA 844afbfView commit details -
Configuration menu - View commit details
-
Copy full SHA for a5dfb68 - Browse repository at this point
Copy the full SHA a5dfb68View commit details -
Configuration menu - View commit details
-
Copy full SHA for 41438c2 - Browse repository at this point
Copy the full SHA 41438c2View commit details -
Auto merge of rust-lang#10788 - Centri3:duplicate_manual_partial_ord_…
…impl, r=xFrednet,blyxyas New lint [`manual_partial_ord_and_ord_impl`] Lints when both `PartialOrd` and `Ord` are manually implemented yet the body of `PartialOrd::partial_cmp` isn't `Some(self.cmp(<other>))`. This is in `correctness` currently but I'm ok with elsewhere. Closes rust-lang#10744 --- changelog: new lint [`needless_partial_ord_impl`] [rust-lang#10788](rust-lang/rust-clippy#10788)
Configuration menu - View commit details
-
Copy full SHA for e5db198 - Browse repository at this point
Copy the full SHA e5db198View commit details -
Auto merge of rust-lang#11049 - Centri3:manual_is_infinite, r=blyxyas…
…,xFrednet New lints [`manual_is_infinite`] and [`manual_is_finite`] Closes rust-lang#9665 changelog: New lints [`manual_is_infinite`] and [`manual_is_finite`] [rust-lang#11049](rust-lang/rust-clippy#11049)
Configuration menu - View commit details
-
Copy full SHA for 8e261c0 - Browse repository at this point
Copy the full SHA 8e261c0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2be695b - Browse repository at this point
Copy the full SHA 2be695bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6384221 - Browse repository at this point
Copy the full SHA 6384221View commit details -
Auto merge of rust-lang#11129 - c410-f3r:lock-1, r=Manishearth
[significant_drop_tightening] Fix rust-lang#11128 Fix rust-lang#11128 ``` changelog: [`significant_drop_tightening`]: Consider manual alias of the `drop` function. ```
Configuration menu - View commit details
-
Copy full SHA for 6ae065f - Browse repository at this point
Copy the full SHA 6ae065fView commit details -
Configuration menu - View commit details
-
Copy full SHA for b4738a6 - Browse repository at this point
Copy the full SHA b4738a6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3bf2138 - Browse repository at this point
Copy the full SHA 3bf2138View commit details
Commits on Jul 9, 2023
-
Auto merge of rust-lang#11130 - smoelius:fix-10535, r=Jarcho
Fix ICE in rust-lang#10535 Fixes rust-lang#10535 r? `@Jarcho` changelog: Eliminate ICE described in rust-lang#10535
Configuration menu - View commit details
-
Copy full SHA for 757fe49 - Browse repository at this point
Copy the full SHA 757fe49View commit details -
Auto merge of rust-lang#10900 - GuillaumeGomez:needless-pass-by-ref, …
…r=llogiq Add `needless_pass_by_ref_mut` lint changelog: [`needless_pass_by_ref_mut`]: This PR add a new lint `needless_pass_by_ref_mut` which emits a warning in case a `&mut` function argument isn't used mutably. It doesn't warn on trait and trait impls functions. Fixes rust-lang#8863.
Configuration menu - View commit details
-
Copy full SHA for b46033e - Browse repository at this point
Copy the full SHA b46033eView commit details -
Auto merge of rust-lang#11055 - smoelius:try-this, r=dswij
"try this" -> "try" Current help messages contain a mix of "try", "try this", and one "try this instead". In the spirit of rust-lang#10631, this PR adopts the first, as it is the most concise. It also updates the `lint_message_conventions` test to catch cases of "try this". (Aside: rust-lang#10120 unfairly contained multiple changes in one PR. I am trying to break that PR up into smaller pieces.) changelog: Make help messages more concise ("try this" -> "try").
Configuration menu - View commit details
-
Copy full SHA for ebd8d31 - Browse repository at this point
Copy the full SHA ebd8d31View commit details -
Auto merge of rust-lang#11110 - y21:unnecessary_literal_unwrap_ignore…
…_expn, r=Jarcho [`unnecessary_literal_unwrap`]: don't lint if binding initializer comes from expansion Fixes rust-lang/rust-clippy#11109 changelog: [`unnecessary_literal_unwrap`]: don't lint if binding initializer comes from expansion
Configuration menu - View commit details
-
Copy full SHA for 507d1c2 - Browse repository at this point
Copy the full SHA 507d1c2View commit details
Commits on Jul 10, 2023
-
Auto merge of rust-lang#11096 - y21:issue11091, r=giraffate
[`manual_range_patterns`]: lint negative values Fixes rust-lang#11091. Now also lints negative values in patterns (`-1 | -2 | -3`) changelog: [`manual_range_patterns`]: lint negative values
Configuration menu - View commit details
-
Copy full SHA for 9058b04 - Browse repository at this point
Copy the full SHA 9058b04View commit details -
Configuration menu - View commit details
-
Copy full SHA for d1575d1 - Browse repository at this point
Copy the full SHA d1575d1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 23ac723 - Browse repository at this point
Copy the full SHA 23ac723View commit details -
Auto merge of rust-lang#11133 - GuillaumeGomez:fix-description-typo, …
…r=Manishearth Fix typo in `needless_pass_by_ref_mut` lint description Someone nicely showed me that I made a small typo in rust-lang/rust-clippy#10900. changelog: none
Configuration menu - View commit details
-
Copy full SHA for 9ab7137 - Browse repository at this point
Copy the full SHA 9ab7137View commit details -
Auto merge of rust-lang#11016 - y21:issue10029, r=blyxyas,dswij
[`filter_next`]: suggest making binding mutable if it needs to be Fixes rust-lang#10029 changelog: [`filter_next`]: suggest making binding mutable if it needs to be and adjust applicability
Configuration menu - View commit details
-
Copy full SHA for 3be3fb7 - Browse repository at this point
Copy the full SHA 3be3fb7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 103949b - Browse repository at this point
Copy the full SHA 103949bView commit details
Commits on Jul 11, 2023
-
Configuration menu - View commit details
-
Copy full SHA for cd1c853 - Browse repository at this point
Copy the full SHA cd1c853View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0b5dac0 - Browse repository at this point
Copy the full SHA 0b5dac0View commit details -
Auto merge of rust-lang#111717 - Urgau:uplift_fn_null_check, r=oli-obk
Uplift `clippy::fn_null_check` lint This PR aims at uplifting the `clippy::fn_null_check` lint into rustc. ## `incorrect_fn_null_checks` (warn-by-default) The `incorrect_fn_null_checks` lint checks for expression that checks if a function pointer is null. ### Example ```rust let fn_ptr: fn() = /* somehow obtained nullable function pointer */ if (fn_ptr as *const ()).is_null() { /* ... */ } ``` ### Explanation Function pointers are assumed to be non-null, checking for their nullity is incorrect. ----- Mostly followed the instructions for uplifting a clippy lint described here: rust-lang#99696 (review) `@rustbot` label: +I-lang-nominated r? compiler
Configuration menu - View commit details
-
Copy full SHA for a8939e5 - Browse repository at this point
Copy the full SHA a8939e5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 31397b4 - Browse repository at this point
Copy the full SHA 31397b4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5ea622c - Browse repository at this point
Copy the full SHA 5ea622cView commit details
Commits on Jul 12, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 7a3756a - Browse repository at this point
Copy the full SHA 7a3756aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 660ef4f - Browse repository at this point
Copy the full SHA 660ef4fView commit details -
[
panic_in_result_fn
] removetodo!
,unimplemented!
,unreachable!
This commit fixes rust-lang#11025 by removing checks for `todo!`, `unimplemented!` and `unreachable!`. Signed-off-by: Panagiotis Foliadis <pfoliadis@hotmail.com>
Configuration menu - View commit details
-
Copy full SHA for c49c177 - Browse repository at this point
Copy the full SHA c49c177View commit details -
Auto merge of rust-lang#11045 - Alexendoo:extern-flags, r=flip1995
Use depinfo to discover UI test dependencies changelog: none context: https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/Building.20test.20dependencies This restores [the old `EXTERN_FLAGS` method](https://github.com/rust-lang/rust-clippy/blob/4cf5bdc60c7ccec3b5f395ee393615c224e28555/tests/compile-test.rs#L67-L75) of passing `--extern` flags for building UI tests with minor changes - Unused deps were removed - It's now a `Vec` of args instead of a command string - It uses a `BTreeMap` so the extern flags are in alphabetical order and deterministic I don't know if the `HOST_LIBS` part is still required, but I figured it best to leave it in for now. If the change is accepted we can take a look if it's needed in `rust-lang/rust` after the next sync This isn't as pleasant as having a `Cargo.toml`, though there is something satisfying about knowing the dependencies are already built and not needing to invoke `cargo` r? `@flip1995`
Configuration menu - View commit details
-
Copy full SHA for 53d2938 - Browse repository at this point
Copy the full SHA 53d2938View commit details -
Auto merge of rust-lang#11098 - y21:issue11093, r=giraffate
[`unnecessary_literal_unwrap`]: also lint `unwrap_(err_)unchecked` Closes rust-lang#11093 changelog: [`unnecessary_literal_unwrap`]: also lint `unwrap_unchecked` and `unwrap_err_unchecked`
Configuration menu - View commit details
-
Copy full SHA for 3b43b1e - Browse repository at this point
Copy the full SHA 3b43b1eView commit details -
Configuration menu - View commit details
-
Copy full SHA for c5fc61c - Browse repository at this point
Copy the full SHA c5fc61cView commit details -
[
tuple_array_conversions
]: move fromcomplexity
tonursery
Due to outstanding issues: * rust-lang/rust-clippy#11082 * rust-lang/rust-clippy#11085 * rust-lang/rust-clippy#11100 (rust-lang/rust-clippy#11105) * rust-lang/rust-clippy#11124 * rust-lang/rust-clippy#11144
Configuration menu - View commit details
-
Copy full SHA for 4102a30 - Browse repository at this point
Copy the full SHA 4102a30View commit details -
Auto merge of rust-lang#11138 - xFrednet:changelog-1-71, r=flip1995
Changelog for Rust 1.71 👑 Roses are red, violets are blue, new format is tried, it's way less of a fight --- Hey `@rust-lang/clippy,` `@blyxyas,` and `@Centri3,` I've tried the "new"/minimal changelog format we discussed a few meetings ago. I like it, and the writing process was also way quicker. [:framed_picture: Rendered :framed_picture:](https://github.com/xFrednet/rust-clippy/blob/changelog-1-71/CHANGELOG.md#rust-171) Furthermore, a big thank you to `@blyxyas` and `@Alexendoo` for updating the script that fetches the PR commits and adding links to the config values to the changelog. ❤️ --- changelog: none
Configuration menu - View commit details
-
Copy full SHA for d398e59 - Browse repository at this point
Copy the full SHA d398e59View commit details -
Auto merge of rust-lang#11123 - panosfol:master, r=giraffate
[`panic_in_result_fn`] remove `todo!`, `unimplemented!`, `unreachable!` This commit fixes rust-lang#11025 by removing checks for `todo!`, `unimplemented!` and `unreachable!`. changelog: [`panic_in_result_fn`] remove `todo!`, `unimplemented!`, `unreachable!`
Configuration menu - View commit details
-
Copy full SHA for df92b52 - Browse repository at this point
Copy the full SHA df92b52View commit details
Commits on Jul 13, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 050b714 - Browse repository at this point
Copy the full SHA 050b714View commit details -
Auto merge of rust-lang#11148 - smoelius:nb-known-problems, r=Jarcho
Add "Known problems" section to `needless_borrow` documentation While this PR doesn't fix the issue in rust-lang#11142, it at least communicates that this is a known limitation. r? `@Jarcho` changelog: Add "Known problems" section to `needless_borrow` documentation
Configuration menu - View commit details
-
Copy full SHA for b10a0aa - Browse repository at this point
Copy the full SHA b10a0aaView commit details -
Auto merge of rust-lang#11146 - hydro-project:tuple-array-conversions…
…, r=Centri3,xFrednet [`tuple_array_conversions`]: move from `complexity` to `nursery` The lint suggestion is arguably often less readable and more complex than the original code. For example, which of the following is the most readable: ```rust let _vertices = edges.flat_map(|(src, dst)| [src, dst]); let _vertices = edges.flat_map(<_ as Into<[i32; 2]>>::into); let _vertices = edges.flat_map(<[i32; 2]>::from); ``` The lint can be useful, but really only applies if the tuple is either long enough that naming the fields is silly (maybe at least 4 entries long), or if the author intends the fields to be homogenous, which is author intent and can't be determined by the lint. Therefore I think the lint should be marked as pedantic. Currently, there are also a lot of false positives with the lint: * rust-lang/rust-clippy#11082 * rust-lang/rust-clippy#11085 * rust-lang/rust-clippy#11100 (rust-lang/rust-clippy#11105) * rust-lang/rust-clippy#11124 * rust-lang/rust-clippy#11144 Should fix those issues before enabling it for everyone. --- changelog: Move [`tuple_array_conversions`] to `nursery` (Now allow-by-default) <!-- FIY: Ignore this change, if the commit gets backported --> [rust-lang#11146](rust-lang/rust-clippy#11146)
Configuration menu - View commit details
-
Copy full SHA for 631faa1 - Browse repository at this point
Copy the full SHA 631faa1View commit details -
Auto merge of rust-lang#11147 - y21:issue11145, r=Alexendoo
[`arithmetic_side_effect`]: allow different types on the right hand side for `Wrapping<T>` Fixes rust-lang#11145 This lint has a list of allowed types, one of which is `Wrapping<T>`, but it was only actually allowed if the type on the right hand side was also `Wrapping<T>`, which meant that, for example, `Wrapping<u32> += u32` would still lint. It now allows binary ops involving `Wrapping<T>` regardless of the type on the rhs. These impls have only existed since Rust 1.60.0, so that is probably why the lint was previously not handling this correctly changelog: [`arithmetic_side_effect`]: allow different types on the right hand side for `Wrapping<T>` (e.g. `Wrapping<T> += T`)
Configuration menu - View commit details
-
Copy full SHA for a0e8257 - Browse repository at this point
Copy the full SHA a0e8257View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2811eff - Browse repository at this point
Copy the full SHA 2811effView commit details -
Auto merge of rust-lang#11095 - Alexendoo:rustfmt-imports, r=Manishearth
Add `imports_granularity = "Module"` to rustfmt.toml This lets rustfmt split/merge imports, `Module` seems to be the most common style in clippy https://rust-lang.github.io/rustfmt/?version=v1.6.0&search=#imports_granularity changelog: none Almost all the updates other than the config file change are from `cargo dev fmt` or blessed tests, the exceptions being - `tests/ui/single_component_path_imports.rs` - `tests/ui/single_component_path_imports_nested_first.rs` - `tests/ui/single_component_path_imports_self_after.rs` - `tests/ui/single_component_path_imports_self_before.rs` - `tests/ui/unsafe_removed_from_name.rs` (added a test with merged imports as a drive by) - `tests/ui/wildcard_imports.rs` - `tests/ui/wildcard_imports_2021.rs`
Configuration menu - View commit details
-
Copy full SHA for 7ccf5d4 - Browse repository at this point
Copy the full SHA 7ccf5d4View commit details -
Set
unnecessary_cast
suggestion toMaybeIncorrect
for pointer castsRemoving casts may cause type inference to stop working which requires manual intervention
Configuration menu - View commit details
-
Copy full SHA for ea36a9d - Browse repository at this point
Copy the full SHA ea36a9dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 36279f1 - Browse repository at this point
Copy the full SHA 36279f1View commit details -
Auto merge of rust-lang#11154 - Alexendoo:track-clippy-conf-dir, r=fl…
…ip1995 Trigger a rebuild when `CLIPPY_CONF_DIR` changes changelog: none This is a fix for rust-lang/rust-clippy#9928 (comment), any time `CLIPPY_CONF_DIR` changes cargo will now rebuild the crate clippy is being run on, giving it a chance to lint with the (potentially) different config file r? `@flip1995`
Configuration menu - View commit details
-
Copy full SHA for 4b355d8 - Browse repository at this point
Copy the full SHA 4b355d8View commit details
Commits on Jul 14, 2023
-
Auto merge of rust-lang#11152 - Alexendoo:unnecessary-cast-applicabil…
…ity, r=Manishearth Set `unnecessary_cast` suggestion to `MaybeIncorrect` for pointer casts Closes rust-lang#11113 changelog: none
Configuration menu - View commit details
-
Copy full SHA for bafde54 - Browse repository at this point
Copy the full SHA bafde54View commit details -
Configuration menu - View commit details
-
Copy full SHA for 415fdb2 - Browse repository at this point
Copy the full SHA 415fdb2View commit details -
Configuration menu - View commit details
-
Copy full SHA for faa07d3 - Browse repository at this point
Copy the full SHA faa07d3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 753c30f - Browse repository at this point
Copy the full SHA 753c30fView commit details -
Auto merge of rust-lang#11157 - flip1995:rustup, r=flip1995
Rustup r? `@ghost` changelog: none
Configuration menu - View commit details
-
Copy full SHA for 1d33469 - Browse repository at this point
Copy the full SHA 1d33469View commit details
Commits on Jul 16, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 498db80 - Browse repository at this point
Copy the full SHA 498db80View commit details -
Auto merge of rust-lang#11169 - y21:new_lint_unelide_lifetimes, r=xFr…
…ednet don't hide lifetimes for `LateContext` Running `cargo dev new_lint --type methods` creates the lint file with hidden lifetimes for the `LateContext` parameter (i.e. `&LateContext`, when it should be `&LateContext<'_>`). This is already warned on with `#![warn(rust_2018_idioms)]`, so clippy should not use hidden lifetimes changelog: none
Configuration menu - View commit details
-
Copy full SHA for d9c24d1 - Browse repository at this point
Copy the full SHA d9c24d1View commit details
Commits on Jul 17, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 561303d - Browse repository at this point
Copy the full SHA 561303dView commit details -
Configuration menu - View commit details
-
Copy full SHA for c2490bd - Browse repository at this point
Copy the full SHA c2490bdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8ca13e8 - Browse repository at this point
Copy the full SHA 8ca13e8View commit details