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

Update Clippy #113686

Merged
merged 126 commits into from
Jul 17, 2023
Merged

Update Clippy #113686

merged 126 commits into from
Jul 17, 2023

Commits on Jun 18, 2023

  1. new lint: type_id_on_box

    y21 committed Jun 18, 2023
    Configuration menu
    Copy the full SHA
    c5a9adc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9ab1e8e View commit details
    Browse the repository at this point in the history
  3. add it to the methods lint pass

    y21 committed Jun 18, 2023
    Configuration menu
    Copy the full SHA
    26ac76c View commit details
    Browse the repository at this point in the history
  4. add a few more test cases

    y21 committed Jun 18, 2023
    Configuration menu
    Copy the full SHA
    b0dfecd View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2023

  1. s/is_dyn_trait/is_dyn_any

    y21 committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    1b6738b View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2023

  1. Configuration menu
    Copy the full SHA
    7bd8ab7 View commit details
    Browse the repository at this point in the history
  2. Add SPEEDTEST

    blyxyas committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    d69c4f5 View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2023

  1. Fix dogfood

    blyxyas committed Jun 27, 2023
    Configuration menu
    Copy the full SHA
    0cd8bbc View commit details
    Browse the repository at this point in the history

Commits on Jun 28, 2023

  1. Finally fix dogfood

    blyxyas committed Jun 28, 2023
    Configuration menu
    Copy the full SHA
    57923c3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4340a8a View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2023

  1. 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.
    est31 committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    86391ab View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c6be621 View commit details
    Browse the repository at this point in the history
  3. Put into one pass

    est31 committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    20dfaba View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2f7f139 View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2023

  1. "try this" -> "try"

    smoelius committed Jul 1, 2023
    Configuration menu
    Copy the full SHA
    420f3d1 View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2023

  1. 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?
    bors committed Jul 2, 2023
    Configuration menu
    Copy the full SHA
    bb33e03 View commit details
    Browse the repository at this point in the history
  2. Fix typos

    Centri3 committed Jul 2, 2023
    Configuration menu
    Copy the full SHA
    885a182 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#11058 - Centri3:typos, r=xFrednet

    Fix typos
    
    Just a couple misc typos I found
    
    changelog: none
    bors committed Jul 2, 2023
    Configuration menu
    Copy the full SHA
    1990b72 View commit details
    Browse the repository at this point in the history
  4. 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
    bors committed Jul 2, 2023
    Configuration menu
    Copy the full SHA
    17a48c2 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    cb3ecf7 View commit details
    Browse the repository at this point in the history
  6. Fix valtree changes

    flip1995 committed Jul 2, 2023
    Configuration menu
    Copy the full SHA
    ba1ffec View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    4aa4fec View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    e29a5ac View commit details
    Browse the repository at this point in the history
  9. 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
    bors committed Jul 2, 2023
    Configuration menu
    Copy the full SHA
    83d0682 View commit details
    Browse the repository at this point in the history
  10. 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
    bors committed Jul 2, 2023
    Configuration menu
    Copy the full SHA
    ea4ca22 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    555ceb8 View commit details
    Browse the repository at this point in the history
  12. 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)
    bors committed Jul 2, 2023
    Configuration menu
    Copy the full SHA
    4752466 View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2023

  1. 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`]
    bors committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    c46ddeb View commit details
    Browse the repository at this point in the history
  2. 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.
    est31 committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    6990eaa View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d80581c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    75c339c View commit details
    Browse the repository at this point in the history
  5. 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`
    bors committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    2b03bb0 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9a58107 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1f77f8c View commit details
    Browse the repository at this point in the history
  8. 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
    bors committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    a959061 View commit details
    Browse the repository at this point in the history
  9. 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
    bors committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    3f17c5c View commit details
    Browse the repository at this point in the history
  10. 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
    bors committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    ba3bd8f View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    b4549c5 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    b41fc67 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    a43bea1 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    c62c7fa View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    dd3e00f View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    33adfcd View commit details
    Browse the repository at this point in the history
  17. new lint: read_line_without_trim

    y21 committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    8fad54e View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    85f535b View commit details
    Browse the repository at this point in the history
  19. 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
    bors committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    3f4e599 View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2023

  1. Configuration menu
    Copy the full SHA
    f048f73 View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2023

  1. 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`]
    bors committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    1e656d8 View commit details
    Browse the repository at this point in the history
  2. Deal with fallout

    BoxyUwU committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    4062418 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6868c0a View commit details
    Browse the repository at this point in the history
  4. Patch clippy

    oli-obk committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    a4f9914 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f945351 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    cbe4682 View commit details
    Browse the repository at this point in the history

Commits on Jul 6, 2023

  1. 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.
    bors committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    8aca068 View commit details
    Browse the repository at this point in the history
  2. 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`
    bors committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    8c70e52 View commit details
    Browse the repository at this point in the history
  3. 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
    bors committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    dd8e44c View commit details
    Browse the repository at this point in the history

Commits on Jul 7, 2023

  1. manual_float_methods

    Centri3 committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    f12edfd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5949f76 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4939a71 View commit details
    Browse the repository at this point in the history
  4. 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
    bors committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    26edd5a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2865526 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5cc0c04 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c927912 View commit details
    Browse the repository at this point in the history
  8. 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.
    Noratrieb committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    b5ac726 View commit details
    Browse the repository at this point in the history
  9. Fix failing clippy tests

    Comments out the C string literals due to rust-lang#113334
    
    Fixes rust-lang/rust-clippy#11121
    Alexendoo committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    87373d7 View commit details
    Browse the repository at this point in the history
  10. 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.
    Noratrieb committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    5df1f66 View commit details
    Browse the repository at this point in the history
  11. 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
    bors committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    2eff2f2 View commit details
    Browse the repository at this point in the history
  12. 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
    bors committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    3a1fc26 View commit details
    Browse the repository at this point in the history

Commits on Jul 8, 2023

  1. 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
    bors committed Jul 8, 2023
    Configuration menu
    Copy the full SHA
    1816caa View commit details
    Browse the repository at this point in the history
  2. 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.
    Noratrieb committed Jul 8, 2023
    Configuration menu
    Copy the full SHA
    31d50a6 View commit details
    Browse the repository at this point in the history
  3. 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
    bors committed Jul 8, 2023
    Configuration menu
    Copy the full SHA
    b485e4f View commit details
    Browse the repository at this point in the history
  4. implement manual_partial_ord_impl

    first try at this
    Centri3 committed Jul 8, 2023
    Configuration menu
    Copy the full SHA
    2a1fd22 View commit details
    Browse the repository at this point in the history
  5. 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
    Centri3 committed Jul 8, 2023
    Configuration menu
    Copy the full SHA
    004e89d View commit details
    Browse the repository at this point in the history
  6. use other instead of self

    Centri3 committed Jul 8, 2023
    Configuration menu
    Copy the full SHA
    844afbf View commit details
    Browse the repository at this point in the history
  7. refactor

    Centri3 committed Jul 8, 2023
    Configuration menu
    Copy the full SHA
    a5dfb68 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    41438c2 View commit details
    Browse the repository at this point in the history
  9. 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)
    bors committed Jul 8, 2023
    Configuration menu
    Copy the full SHA
    e5db198 View commit details
    Browse the repository at this point in the history
  10. 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)
    bors committed Jul 8, 2023
    Configuration menu
    Copy the full SHA
    8e261c0 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    2be695b View commit details
    Browse the repository at this point in the history
  12. Dogfood

    c410-f3r committed Jul 8, 2023
    Configuration menu
    Copy the full SHA
    6384221 View commit details
    Browse the repository at this point in the history
  13. 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.
    ```
    bors committed Jul 8, 2023
    Configuration menu
    Copy the full SHA
    6ae065f View commit details
    Browse the repository at this point in the history
  14. Add test for rust-lang#10535

    smoelius committed Jul 8, 2023
    Configuration menu
    Copy the full SHA
    b4738a6 View commit details
    Browse the repository at this point in the history
  15. Fix rust-lang#10535

    smoelius committed Jul 8, 2023
    Configuration menu
    Copy the full SHA
    3bf2138 View commit details
    Browse the repository at this point in the history

Commits on Jul 9, 2023

  1. 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
    bors committed Jul 9, 2023
    Configuration menu
    Copy the full SHA
    757fe49 View commit details
    Browse the repository at this point in the history
  2. 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.
    bors committed Jul 9, 2023
    Configuration menu
    Copy the full SHA
    b46033e View commit details
    Browse the repository at this point in the history
  3. 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").
    bors committed Jul 9, 2023
    Configuration menu
    Copy the full SHA
    ebd8d31 View commit details
    Browse the repository at this point in the history
  4. 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
    bors committed Jul 9, 2023
    Configuration menu
    Copy the full SHA
    507d1c2 View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2023

  1. 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
    bors committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    9058b04 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d1575d1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    23ac723 View commit details
    Browse the repository at this point in the history
  4. 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
    bors committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    9ab7137 View commit details
    Browse the repository at this point in the history
  5. 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
    bors committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    3be3fb7 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    103949b View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2023

  1. Configuration menu
    Copy the full SHA
    cd1c853 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0b5dac0 View commit details
    Browse the repository at this point in the history
  3. 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
    bors committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    a8939e5 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    31397b4 View commit details
    Browse the repository at this point in the history
  5. Changelog for Rust 1.71 👑

    xFrednet committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    5ea622c View commit details
    Browse the repository at this point in the history

Commits on Jul 12, 2023

  1. Configuration menu
    Copy the full SHA
    7a3756a View commit details
    Browse the repository at this point in the history
  2. Ignore flaky clippy tests.

    ehuss committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    660ef4f View commit details
    Browse the repository at this point in the history
  3. [panic_in_result_fn] remove todo!, unimplemented!, unreachable!

    This commit fixes rust-lang#11025 by removing checks for `todo!`,
    `unimplemented!` and `unreachable!`.
    
    Signed-off-by: Panagiotis Foliadis <pfoliadis@hotmail.com>
    panosfol committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    c49c177 View commit details
    Browse the repository at this point in the history
  4. 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`
    bors committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    53d2938 View commit details
    Browse the repository at this point in the history
  5. 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`
    bors committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    3b43b1e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c5fc61c View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    4102a30 View commit details
    Browse the repository at this point in the history
  8. 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
    bors committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    d398e59 View commit details
    Browse the repository at this point in the history
  9. 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!`
    bors committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    df92b52 View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2023

  1. Configuration menu
    Copy the full SHA
    050b714 View commit details
    Browse the repository at this point in the history
  2. 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
    bors committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    b10a0aa View commit details
    Browse the repository at this point in the history
  3. 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)
    bors committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    631faa1 View commit details
    Browse the repository at this point in the history
  4. 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`)
    bors committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    a0e8257 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2811eff View commit details
    Browse the repository at this point in the history
  6. 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`
    bors committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    7ccf5d4 View commit details
    Browse the repository at this point in the history
  7. Set unnecessary_cast suggestion to MaybeIncorrect for pointer casts

    Removing casts may cause type inference to stop working which requires
    manual intervention
    Alexendoo committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    ea36a9d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    36279f1 View commit details
    Browse the repository at this point in the history
  9. 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`
    bors committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    4b355d8 View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2023

  1. 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
    bors committed Jul 14, 2023
    Configuration menu
    Copy the full SHA
    bafde54 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    415fdb2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    faa07d3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    753c30f View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#11157 - flip1995:rustup, r=flip1995

    Rustup
    
    r? `@ghost`
    
    changelog: none
    bors committed Jul 14, 2023
    Configuration menu
    Copy the full SHA
    1d33469 View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2023

  1. Configuration menu
    Copy the full SHA
    498db80 View commit details
    Browse the repository at this point in the history
  2. 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
    bors committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    d9c24d1 View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2023

  1. Configuration menu
    Copy the full SHA
    561303d View commit details
    Browse the repository at this point in the history
  2. Update Cargo.lock/toml

    Remove clippy_test_deps from Cargo.toml
    flip1995 committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    c2490bd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8ca13e8 View commit details
    Browse the repository at this point in the history