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 #102729

Merged
merged 188 commits into from
Oct 7, 2022
Merged

Update Clippy #102729

merged 188 commits into from
Oct 7, 2022

Commits on Sep 6, 2022

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

Commits on Sep 7, 2022

  1. rustc: Parameterize ty::Visibility over used ID

    It allows using `LocalDefId` instead of `DefId` when possible, and also encode cheaper `Visibility<DefIndex>` into metadata.
    petrochenkov committed Sep 7, 2022
    Configuration menu
    Copy the full SHA
    9136096 View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2022

  1. Arena-allocate hir::Lifetime.

    This shrinks `hir::Ty` from 72 to 48 bytes.
    
    `visit_lifetime` is added to the HIR stats collector because these types
    are now stored in memory on their own, instead of being within other
    types.
    nnethercote committed Sep 8, 2022
    Configuration menu
    Copy the full SHA
    977b6e2 View commit details
    Browse the repository at this point in the history
  2. Introduce DotDotPos.

    This shrinks `hir::Pat` from 88 to 72 bytes.
    nnethercote committed Sep 8, 2022
    Configuration menu
    Copy the full SHA
    c86a9c0 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#101498 - petrochenkov:visparam, r=cjgillot

    rustc: Parameterize `ty::Visibility` over used ID
    
    It allows using `LocalDefId` instead of `DefId` when possible, and also encode cheaper `Visibility<DefIndex>` into metadata.
    Dylan-DPC authored Sep 8, 2022
    Configuration menu
    Copy the full SHA
    c3db185 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#101467 - nnethercote:shrink-hir-Ty-Pat, r=spa…

    …storino
    
    Shrink `hir::Ty` and `hir::Pat`
    
    r? `@ghost`
    bors committed Sep 8, 2022
    Configuration menu
    Copy the full SHA
    30a5815 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#101501 - Jarcho:tcx_lint_passes, r=davidtwco

    Allow lint passes to be bound by `TyCtxt`
    
    This will allow storing things like `Ty<'tcx>` inside late lint passes. It's already possible to store various id types so they're already implicitly bound to a specific `TyCtxt`.
    
    r? rust-lang/compiler
    Dylan-DPC authored Sep 8, 2022
    Configuration menu
    Copy the full SHA
    9faa588 View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#101577 - Dylan-DPC:rollup-l9xw7i7, r=Dylan-DPC

    Rollup of 7 pull requests
    
    Successful merges:
    
     - rust-lang#98933 (Opaque types' generic params do not imply anything about their hidden type's lifetimes)
     - rust-lang#101041 (translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Pt. 2)
     - rust-lang#101424 (Adjust and slightly generalize operator error suggestion)
     - rust-lang#101496 (Allow lower_lifetime_binder receive a closure)
     - rust-lang#101501 (Allow lint passes to be bound by `TyCtxt`)
     - rust-lang#101515 (Recover from typo where == is used in place of =)
     - rust-lang#101545 (Remove unnecessary `PartialOrd` and `Ord`)
    
    Failed merges:
    
    r? `@ghost`
    `@rustbot` modify labels: rollup
    bors committed Sep 8, 2022
    Configuration menu
    Copy the full SHA
    f47a1e2 View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2022

  1. Remove ReEmpty

    jackh726 committed Sep 9, 2022
    Configuration menu
    Copy the full SHA
    b640eaa View commit details
    Browse the repository at this point in the history
  2. Make clippy happy

    compiler-errors committed Sep 9, 2022
    Configuration menu
    Copy the full SHA
    ac1c68a View commit details
    Browse the repository at this point in the history
  3. Appease clippy again

    compiler-errors committed Sep 9, 2022
    Configuration menu
    Copy the full SHA
    854f751 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    98bf99e View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2022

  1. Configuration menu
    Copy the full SHA
    41b3084 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#98559 - jackh726:remove-reempty, r=oli-obk

    Remove ReEmpty
    
    r? rust-lang/types
    bors committed Sep 10, 2022
    Configuration menu
    Copy the full SHA
    42361da View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2022

  1. Configuration menu
    Copy the full SHA
    f6005c6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3081535 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0d1469a View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#99334 - NiklasJonsson:84447/error-privacy, r=…

    …oli-obk
    
    rustc_error, rustc_private: Switch to stable hash containers
    
    Relates rust-lang#84447
    bors committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    4e313a5 View commit details
    Browse the repository at this point in the history
  5. Fix clippy.

    reitermarkus committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    c0e249c View commit details
    Browse the repository at this point in the history
  6. Simplify clippy fix.

    reitermarkus committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    64a42db View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2022

  1. Make x.py check work

    eholk committed Sep 13, 2022
    Configuration menu
    Copy the full SHA
    b95b285 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#100640 - reitermarkus:socket-display-buffer, …

    …r=thomcc
    
    Use `DisplayBuffer` for socket addresses.
    
    Continuation of rust-lang#100625 for socket addresses.
    
    Renames `net::addr` to `net::addr::socket`, `net::ip` to `net::addr::ip` and `net::ip::display_buffer::IpDisplayBuffer` to `net::addr::display_buffer::DisplayBuffer`.
    bors committed Sep 13, 2022
    Configuration menu
    Copy the full SHA
    985afe0 View commit details
    Browse the repository at this point in the history
  3. Address code review comments

    eholk committed Sep 13, 2022
    Configuration menu
    Copy the full SHA
    27e91b6 View commit details
    Browse the repository at this point in the history

Commits on Sep 14, 2022

  1. Auto merge of rust-lang#101709 - nnethercote:simplify-visitors-more, …

    …r=cjgillot
    
    Simplify visitors more
    
    A successor to rust-lang#100392.
    
    r? `@cjgillot`
    bors committed Sep 14, 2022
    Configuration menu
    Copy the full SHA
    cf043f6 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#101212 - eholk:dyn-star, r=compiler-errors

    Initial implementation of dyn*
    
    This PR adds extremely basic and incomplete support for [dyn*](https://smallcultfollowing.com/babysteps//blog/2022/03/29/dyn-can-we-make-dyn-sized/). The goal is to get something in tree behind a flag to make collaboration easier, and also to make sure the implementation so far is not unreasonable. This PR does quite a few things:
    
    * Introduce `dyn_star` feature flag
    * Adds parsing for `dyn* Trait` types
    * Defines `dyn* Trait` as a sized type
    * Adds support for explicit casts, like `42usize as dyn* Debug`
      * Including const evaluation of such casts
    * Adds codegen for drop glue so things are cleaned up properly when a `dyn* Trait` object goes out of scope
    * Adds codegen for method calls, at least for methods that take `&self`
    
    Quite a bit is still missing, but this gives us a starting point. Note that this is never intended to become stable surface syntax for Rust, but rather `dyn*` is planned to be used as an implementation detail for async functions in dyn traits.
    
    Joint work with `@nikomatsakis` and `@compiler-errors.`
    
    r? `@bjorn3`
    bors committed Sep 14, 2022
    Configuration menu
    Copy the full SHA
    f6a07d1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    525e0c8 View commit details
    Browse the repository at this point in the history

Commits on Sep 15, 2022

  1. Auto merge of rust-lang#101811 - flip1995:clippyup, r=flip1995

    Clippy pre beta branch fix
    
    Before beta is branched on Friday, I want to move the `unused_peekable` lint  that was added in this release cycle (1.65) to `nursery`. This lint was already reported twice (rust-lang/rust-clippy#9456, rust-lang/rust-clippy#9462) in a short time, so it is probably a good idea to fix it before it hits beta and then stable.
    
    r? `@Manishearth`
    bors committed Sep 15, 2022
    Configuration menu
    Copy the full SHA
    dcc6153 View commit details
    Browse the repository at this point in the history
  2. Fix clippy

    est31 committed Sep 15, 2022
    Configuration menu
    Copy the full SHA
    2be8b73 View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2022

  1. Revert "Revert "Rollup merge of rust-lang#98582 - oli-obk:unconstrain…

    …ed_opaque_type, r=estebank""
    
    This reverts commit 4a742a6.
    oli-obk committed Sep 16, 2022
    Configuration menu
    Copy the full SHA
    c2e9c99 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3ca6b9d View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2022

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

Commits on Sep 18, 2022

  1. refactor needless_return

    kraktus committed Sep 18, 2022
    Configuration menu
    Copy the full SHA
    d1dbdcf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bf8870e View commit details
    Browse the repository at this point in the history
  3. further refactor

    kraktus committed Sep 18, 2022
    Configuration menu
    Copy the full SHA
    15ec5d2 View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2022

  1. small refactor

    kraktus committed Sep 19, 2022
    Configuration menu
    Copy the full SHA
    23d1d07 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    70f4c71 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5c0cb0d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d63aece View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2022

  1. Auto merge of rust-lang#99806 - oli-obk:unconstrained_opaque_type, r=…

    …estebank
    
    Allow patterns to constrain the hidden type of opaque types
    
    fixes rust-lang#96572
    
    reverts a revert as original PR was a perf regression that was fixed by reverting it: rust-lang#99368 (comment))
    
    TODO:
    
    * check if rust-lang#99685 is avoided
    bors committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    0dc24ca View commit details
    Browse the repository at this point in the history
  2. Changelog for Rust 1.64 🍎

    xFrednet committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    e279f22 View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2022

  1. Merge commit '7248d06384c6a90de58c04c1f46be88821278d8b' into sync-fro…

    …m-clippy
    David Koloski committed Sep 21, 2022
    Configuration menu
    Copy the full SHA
    4d01529 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4c5f230 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    033dae9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    09b1e8f View commit details
    Browse the repository at this point in the history

Commits on Sep 22, 2022

  1. introduce mir::Unevaluated

    b-naber committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    adc7e3e View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#9501 - xFrednet:changelog-1.64, r=llogiq

    Changelog for Rust 1.64 🍎
    
    The normal release preparation dance. I've written the changelog like the version has already been released. The PR can be approved and then merged by anyone after the release of Rust 1.64 🙃
    
    ---
    
    changelog: none
    bors committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    c2c170a View commit details
    Browse the repository at this point in the history
  3. [nonstandard_macro_braces] Do not modify macro arguments

    Also simplify the lint by not caring about code format which should be `rustfmt` job, and turn the lint into machine Applicable
    kraktus committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    a390115 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#9499 - kraktus:nonstandard_macro_braces, r=xF…

    …rednet
    
    [`nonstandard_macro_braces`] Do not modify macro arguments
    
    fix rust-lang#9498
    
    based on top of rust-lang/rust-clippy#9471
    
    Also simplify the lint by not caring about code format which should be `rustfmt` job, and turn the lint into machine Applicable
    
    changelog: Suggestion: [`nonstandard_macro_braces`]: The suggestion is now machine applicable and will no longer replace brackets inside the macro argument.
      [rust-lang#9499](rust-lang/rust-clippy#9499)
    bors committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    61fd2a8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    cda7547 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b333645 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#102123 - schteve:clippy-note, r=Manishearth

    Add note to clippy::non_expressive_names doc
    
    Addresses confusion in rust-lang/rust-clippy#9514 by updating the lint docs.
    matthiaskrgr authored Sep 22, 2022
    Configuration menu
    Copy the full SHA
    2063b8f View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2022

  1. uninit_vec: special case set_len(0)

    set_len(0) does not create uninitialized elements. Fixes a false positive with
    the following pattern:
    
        fn copy_slice_into_vec(dst: &mut Vec<u8>, src: &[u8]) {
            dst.reserve(src.len().saturating_sub(dst.len()));
            unsafe {
                dst.set_len(0);
                std::ptr::copy_nonoverlapping(src.as_ptr(), dst.as_mut_ptr(), src.len());
                dst.set_len(src.len());
            }
        }
    alessandrod committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    49319b4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    628a854 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    26861fb View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#102056 - b-naber:unevaluated, r=lcnr

    Introduce mir::Unevaluated
    
    Previously the distinction between unevaluated constants in the type-system and in mir was not explicit and a little confusing. Probably better to introduce its own type for that.
    
    r? `@lcnr`
    bors committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    d9277c6 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#9519 - alessandrod:uninit-set-len-0, r=llogiq

    uninit_vec: fix false positive with set_len(0)
    
    `set_len(0)` does not create uninitialized elements. Fixes a false positive with the following pattern:
    
    ```rust
    fn copy_slice_into_vec(dst: &mut Vec<u8>, src: &[u8]) {
        dst.reserve(src.len().saturating_sub(dst.len()));
        unsafe {
            dst.set_len(0);
            std::ptr::copy_nonoverlapping(src.as_ptr(), dst.as_mut_ptr(), src.len());
            dst.set_len(src.len());
        }
    }
    ```
    
    zulip thread: https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/uninit_vec.20and.20set_len.280.29
    
    changelog: FP: [`uninit_vec`]: No longer lints `Vec::set_len(0)`
    bors committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    dc14531 View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#9523 - smoelius:compiletest-rs, r=Alexendoo

    Upgrade `compiletest-rs` dependency
    
    From `0.8` to `0.9`.
    
    The new version includes a [fix](Manishearth/compiletest-rs#259) for what I suspect was one cause of the recent rustup failure: https://github.com/rust-lang/rust-clippy/actions/runs/3106438892/jobs/5033324694#step:11:911
    
    changelog: none
    bors committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    c8f2f38 View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#9496 - yotamofek:never_loop_let_else, r=Jarcho

    [`never_loop`]: Fix FP with let..else statements.
    
    Fixes rust-lang#9356
    
    This has been bugging me for a while, so I thought I'd take a stab at it! I'm completely uncertain about the quality of my code, but I think it's an alright start, so opening this PR to get some feedback from more experienced clippy people :)
    
    changelog: [`never_loop`]: Fix FP with let..else statements
    bors committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    ff65eec View commit details
    Browse the repository at this point in the history
  8. Bless clippy.

    cjgillot committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    781e45c View commit details
    Browse the repository at this point in the history
  9. Apply uninlined_format-args to clippy_lints

    This change is needed for the uninlined_format-args lint to be merged.
    See rust-lang/rust-clippy#9233
    nyurik committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    e67b2bf View commit details
    Browse the repository at this point in the history
  10. a few more core lint fixes

    nyurik committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    cb6d126 View commit details
    Browse the repository at this point in the history
  11. and a few more from other dirs

    nyurik committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    59d0e8c View commit details
    Browse the repository at this point in the history
  12. Stabilize const BTree{Map,Set}::new

    Since `len` and `is_empty` are not const stable yet, this also
    creates a new feature for them since they previously used the same
    `const_btree_new` feature.
    Noratrieb committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    334f453 View commit details
    Browse the repository at this point in the history
  13. Fix clippy's const fn stability check for CURRENT_RUSTC_VERSION

    Since clippy can use a projects MSRV for its lints, it might not want
    to consider functions as const stable if they have been added lately.
    
    Functions that have been stabilized this version use
    CURRENT_RUSTC_VERSION as their version, which gets then turned into the
    current version, which might be something like `1.66.0-dev`. The version
    parser cannot deal with this version, so it has to be stripped off.
    Noratrieb committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    e30b37b View commit details
    Browse the repository at this point in the history
  14. Auto merge of rust-lang#9525 - nyurik:apply-lints, r=llogiq

    pre-fallout: Apply uninlined_format-args lint
    
    This change is needed for the uninlined_format-args lint to be merged. See rust-lang/rust-clippy#9233
    
    changelog: none
    bors committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    c2d4266 View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2022

  1. Auto merge of rust-lang#102068 - cjgillot:erased-lifetime-print, r=eholk

    Always print '_, even for erased lifetimes.
    
    Explicit lifetime arguments are now the recommended syntax in rust 2018 and rust 2021.  This PR applies this discipline to rustc itself.
    bors committed Sep 24, 2022
    Configuration menu
    Copy the full SHA
    de8a1dd View commit details
    Browse the repository at this point in the history
  2. fallout2: rework clippy_dev & _lints fmt inlining

    * Inline format args where possible
    * simplify a few complex macros into format str
    * use formatdoc!() instead format!(indoc!(...))
    nyurik committed Sep 24, 2022
    Configuration menu
    Copy the full SHA
    cc6b375 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#9527 - nyurik:inl2, r=llogiq

    fallout2: rework clippy_dev & _lints fmt inlining
    
    Continuing rust-lang#9525 -- a few more inlining, but this time with some code changes to simplify format strings:
    
    * Inline format args where possible
    * simplify a few complex macros into format str
    * use formatdoc!() instead format!(indoc!(...))
    
    changelog: none
    
    cc: `@llogiq`
    bors committed Sep 24, 2022
    Configuration menu
    Copy the full SHA
    8b1ad17 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    fc77d91 View commit details
    Browse the repository at this point in the history
  5. separate definitions and HIR owners

    fix a ui test
    
    use `into`
    
    fix clippy ui test
    
    fix a run-make-fulldeps test
    
    implement `IntoQueryParam<DefId>` for `OwnerId`
    
    use `OwnerId` for more queries
    
    change the type of `ParentOwnerIterator::Item` to `(OwnerId, OwnerNode)`
    TaKO8Ki committed Sep 24, 2022
    Configuration menu
    Copy the full SHA
    ea75178 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    1141c55 View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2022

  1. Auto merge of rust-lang#9531 - Jarcho:ice_9459, r=llogiq

    Fix ICE in `needless_pass_by_value` with unsized `dyn Fn`
    
    fixes rust-lang#9459
    
    Not really sure why a query for a type implementing `FnOnce` even works since the trait if `FnOnce<T>`, but it seems to. I would have expected it to crash like it does when passing `dyn FnOnce()` as the type.
    
    changelog: [`needless_pass_by_value`](https://rust-lang.github.io/rust-clippy/master/#needless_pass_by_value) Fix ICE in with unsized `dyn Fn` argument
    bors committed Sep 25, 2022
    Configuration menu
    Copy the full SHA
    5bd3b56 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    93945a5 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#9535 - alex-semenyuk:move_derive_partial_eq_w…

    …ithout_eq_to_nursery, r=xFrednet
    
    Moved derive_partial_eq_without_eq to nursery
    
    changelog: Moves: Move `derive_partial_eq_without_eq` to `nursery` (now allow-by-default)
      [rust-lang#9536](rust-lang/rust-clippy#9536)
    
    Closes: rust-lang/rust-clippy#9530
    bors committed Sep 25, 2022
    Configuration menu
    Copy the full SHA
    00ebd8e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8493376 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#9533 - Jarcho:integration-ice-msg, r=llogiq

    Fix panic when displaying the backtrace of failing integration tests
    
    changelog: None
    bors committed Sep 25, 2022
    Configuration menu
    Copy the full SHA
    57c9daa View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b180d95 View commit details
    Browse the repository at this point in the history
  7. new uninlined_format_args lint to inline explicit arguments

    Implement rust-lang/rust-clippy#8368 - a new
    lint to inline format arguments such as `print!("{}", var)` into
    `print!("{var}")`.
    
    code | suggestion | comment
    ---|---|---
    `print!("{}", var)` | `print!("{var}")` |  simple variables
    `print!("{0}", var)` | `print!("{var}")` |  positional variables
    `print!("{v}", v=var)` | `print!("{var}")` |  named variables
    `print!("{0} {0}", var)` | `print!("{var} {var}")` |  aliased variables
    `print!("{0:1$}", var, width)` | `print!("{var:width$}")` |  width
    support
    `print!("{0:.1$}", var, prec)` | `print!("{var:.prec$}")` |  precision
    support
    `print!("{:.*}", prec, var)` | `print!("{var:.prec$}")` |  asterisk
    support
    
    code | suggestion | comment
    ---|---|---
    `print!("{0}={1}", var, 1+2)` | `print!("{var}={0}", 1+2)` | Format
    string uses an indexed argument that cannot be inlined.  Supporting this
    case requires re-indexing of the format string.
    
    changelog: [`uninlined_format_args`]: A new lint to inline format
    arguments, i.e. `print!("{}", var)` into `print!("{var}")`
    nyurik committed Sep 25, 2022
    Configuration menu
    Copy the full SHA
    5a71bbd View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2022

  1. Rollup merge of rust-lang#102197 - Nilstrieb:const-new-🌲, r=Mark-Simu…

    …lacrum
    
    Stabilize const `BTree{Map,Set}::new`
    
    The FCP was completed in rust-lang#71835.
    
    Since `len` and `is_empty` are not const stable yet, this also creates a new feature for them since they previously used the same `const_btree_new` feature.
    fee1-dead authored Sep 26, 2022
    Configuration menu
    Copy the full SHA
    c69edba View commit details
    Browse the repository at this point in the history
  2. remove cfg(bootstrap)

    pietroalbini committed Sep 26, 2022
    Configuration menu
    Copy the full SHA
    06568fd View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#9233 - nyurik:capture-vars, r=Alexendoo

    new uninlined_format_args lint to inline explicit arguments
    
    Implement rust-lang/rust-clippy#8368 - a new lint to inline format arguments such as `print!("{}", var)` into `print!("{var}")`.
    
    ### Supported cases
    
    code | suggestion | comment
    ---|---|---
    `print!("{}", var)` | `print!("{var}")` |  simple variables
    `print!("{0}", var)` | `print!("{var}")` |  positional variables
    `print!("{v}", v=var)` | `print!("{var}")` |  named variables
    `print!("{0} {0}", var)` | `print!("{var} {var}")` |  aliased variables
    `print!("{0:1$}", var, width)` | `print!("{var:width$}")` |  width support
    `print!("{0:.1$}", var, prec)` | `print!("{var:.prec$}")` |  precision support
    `print!("{:.*}", prec, var)` | `print!("{var:.prec$}")` |  asterisk support
    
    ### Known Problems
    
    * There may be a false positive if the format string is wrapped in a macro call:
    ```rust
    # let var = 42;
    macro_rules! no_param_str { () => { "{}" }; }
    macro_rules! pass_through { ($expr:expr) => { $expr }; }
    println!(no_param_str!(), var);
    println!(pass_through!("{}"), var);
    ```
    
    * Format string uses an indexed argument that cannot be inlined.
    Supporting this case requires re-indexing of the format string.
    Until implemented, `print!("{0}={1}", var, 1+2)` should be changed to `print!("{var}={0}", 1+2)` by hand.
    
    changelog: [`uninlined_format_args`]: A new lint to inline format arguments, i.e. `print!("{}", var)` into `print!("{var}")`
    bors committed Sep 26, 2022
    Configuration menu
    Copy the full SHA
    cf93865 View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2022

  1. Auto merge of rust-lang#9487 - kraktus:question_mark, r=Jarcho

    Silence [`question_mark`] in const context
    
    fix rust-lang/rust-clippy#9175
    
    When `const_try` is stabilised can be turned into a MSRV
    
    changelog: Silence [`question_mark`] in const context
    bors committed Sep 27, 2022
    Configuration menu
    Copy the full SHA
    78dc616 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    14abb83 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e5ce6d1 View commit details
    Browse the repository at this point in the history
  4. add box-default lint

    llogiq committed Sep 27, 2022
    Configuration menu
    Copy the full SHA
    63f441e View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#9539 - Jarcho:ice_9445, r=flip1995

    Don't lint `*_interior_mutable_const` on unions due to potential ICE.
    
    fixes rust-lang#9445
    cc rust-lang#101113
    
    This started ICE'ing sometime last month due to stricter UB checks. I'm not sure how we could check the value of a union as MIRI doesn't seem to store which field is currently active.
    
    changelog: Don't ICE on const unions containing a `!Freeze` type.
    bors committed Sep 27, 2022
    Configuration menu
    Copy the full SHA
    c153bd6 View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#9507 - c410-f3r:arith, r=Alexendoo

    [arithmetic-side-effects] Consider references
    
    Takes into consideration integer references like `&i32::MAX` because currently things like `let _ = &1 + 0` trigger the lint.
    
    changelog: FP: [`arithmetic_side_effects`]: Now ignores references
      [9507](rust-lang/rust-clippy#9507)
    bors committed Sep 27, 2022
    Configuration menu
    Copy the full SHA
    d31db02 View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#9497 - kraktus:needless_return2, r=llogiq

    [`needless_return`] Recursively remove unneeded semicolons
    
    fix rust-lang#8336,
    fix rust-lang#8156,
    fix rust-lang/rust-clippy#7358,
    fix rust-lang#9192,
    fix rust-lang/rust-clippy#9503
    
    changelog: [`needless_return`] Recursively remove unneeded semicolons
    
    For now the suggestion about removing the semicolons are hidden because they would be very noisy and should be obvious if the user wants to apply the lint manually instead of using `--fix`. This could be an issue for beginner, but haven't found better way to display it.
    bors committed Sep 27, 2022
    Configuration menu
    Copy the full SHA
    47c9145 View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#9543 - philipcraig:fix-saturing-typo, r=giraf…

    …fate
    
    fix typo "Saturing" -> "Saturating"
    
    ---
    
    *Please write a short comment explaining your change (or "none" for internal only changes)*
    
    changelog: fix typo "Saturing" -> "Saturating"
    bors committed Sep 27, 2022
    Configuration menu
    Copy the full SHA
    257fb4b View commit details
    Browse the repository at this point in the history
  9. Auto merge of rust-lang#9511 - rust-lang:box-default, r=Alexendoo

    add `box-default` lint
    
    This adds a `box-default` lint to suggest using `Box::default()` instead of `Box::new(Default::default())`, which offers less moving parts and potentially better performance according to [the perf book](https://nnethercote.github.io/perf-book/standard-library-types.html#box).
    
    ---
    
    changelog: add [`box_default`] lint
    bors committed Sep 27, 2022
    Configuration menu
    Copy the full SHA
    9aa85dc View commit details
    Browse the repository at this point in the history
  10. Don't lint unstable moves in std_instead_of_core

    Such as the currently unstable `core::error`
    Alexendoo committed Sep 27, 2022
    Configuration menu
    Copy the full SHA
    5b0f46a View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    187c27e View commit details
    Browse the repository at this point in the history
  12. Auto merge of rust-lang#9491 - kraktus:drop_copy, r=Jarcho

    [`drop_copy`]: Do not lint idiomatic in match arm
    
    close rust-lang/rust-clippy#9482
    
    changelog: [`drop_copy`]: Do not lint idiomatic in match arm
    bors committed Sep 27, 2022
    Configuration menu
    Copy the full SHA
    672fb8e View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    14ba4fb View commit details
    Browse the repository at this point in the history
  14. Auto merge of rust-lang#9545 - Alexendoo:std-instead-of-core-unstable…

    …, r=Manishearth
    
    Don't lint unstable moves in `std_instead_of_core`
    
    Fixes rust-lang#9515
    
    changelog: [`std_instead_of_core`]: No longer suggests unstable modules such as `core::error`
    bors committed Sep 27, 2022
    Configuration menu
    Copy the full SHA
    35b7ce5 View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2022

  1. Configuration menu
    Copy the full SHA
    7289835 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#9546 - kraktus:default_not_default_trait, r=x…

    …Frednet
    
    [`should_implement_trait`] Also lint `default` method
    
    close rust-lang/rust-clippy#8550
    
    changelog: FP: [`should_implement_trait`]: Now also works for `default` methods
    bors committed Sep 28, 2022
    Configuration menu
    Copy the full SHA
    0f6932a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bbcde66 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    458e832 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#9490 - kraktus:needless_borrow, r=Jarcho

    fix [`needless_borrow`], [`explicit_auto_deref`] FPs on unions
    
    fix rust-lang/rust-clippy#9383
    
    changelog: fix [`needless_borrow`] false positive on unions
    changelog: fix [`explicit_auto_deref`] false positive on unions
    
    Left a couple debug derived impls on purpose I needed to debug as I don't think it's noise
    bors committed Sep 28, 2022
    Configuration menu
    Copy the full SHA
    8845f82 View commit details
    Browse the repository at this point in the history
  6. Fix typo

    alex-semenyuk committed Sep 28, 2022
    Configuration menu
    Copy the full SHA
    8ba081c View commit details
    Browse the repository at this point in the history
  7. [unnecessary_lazy_evaluations] Do not suggest switching to early ev…

    …aluation when type has custom `Drop`
    kraktus committed Sep 28, 2022
    Configuration menu
    Copy the full SHA
    314d57a View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#9550 - alex-semenyuk:fix_typo, r=xFrednet

    Fix typo
    
    changelog: none
    bors committed Sep 28, 2022
    Configuration menu
    Copy the full SHA
    ed9c0e3 View commit details
    Browse the repository at this point in the history
  9. Shrink hir::def::Res.

    `Res::SelfTy` currently has two `Option`s. When the second one is `Some`
    the first one is never consulted. So we can split it into two variants,
    `Res::SelfTyParam` and `Res::SelfTyAlias`, reducing the size of `Res`
    from 24 bytes to 12. This then shrinks `hir::Path` and
    `hir::PathSegment`, which are the HIR types that take up the most space.
    nnethercote committed Sep 28, 2022
    Configuration menu
    Copy the full SHA
    8b59fe4 View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2022

  1. Auto merge of rust-lang#9551 - kraktus:unnecessary_lazy_evaluations, …

    …r=xFrednet
    
    [`unnecessary_lazy_evaluations`] Do not suggest switching to early evaluation when type has custom `Drop`
    
    fix rust-lang#9427
    
    changelog: [`unnecessary_lazy_evaluations`] Do not suggest switching to early evaluation when type has custom `Drop`
    bors committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    5e8a4b6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5797911 View commit details
    Browse the repository at this point in the history
  3. Fix dogfood

    flip1995 committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    67af127 View commit details
    Browse the repository at this point in the history
  4. Update lints after sync

    flip1995 committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    924c1ce View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#9516 - flip1995:rustup, r=flip1995

    Rustup
    
    r? `@ghost`
    
    changelog: none
    bors committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    e43f5a1 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6ec7759 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    416da12 View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2022

  1. Auto merge of rust-lang#9486 - kraktus:lazy_eval, r=dswij

    [`unnecessary_lazy_eval`] Do not lint in external macros
    
    fix rust-lang/rust-clippy#9485, fix rust-lang/rust-clippy#9439
    
    I didn't find a way to add a test since fps occur due to an external crate.
    
    changelog: [`unnecessary_lazy_eval`] Do not lint in external macros
    bors committed Sep 30, 2022
    Configuration menu
    Copy the full SHA
    68408c5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    47a7d68 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#9557 - xxchan:xxchan/safe-anaconda, r=Manishe…

    …arth
    
    doc: make the usage of clippy.toml more clear
    
    Added a subsection for it, and move it after `Allowing/denying lints` which is more frequently used.
    
    fix rust-lang/rust-clippy#9265
    
    *Please write a short comment explaining your change (or "none" for internal only changes)*
    
    changelog: none
    bors committed Sep 30, 2022
    Configuration menu
    Copy the full SHA
    5f25f7e View commit details
    Browse the repository at this point in the history
  4. Fix style in if let chain

    Co-authored-by: Alex Macleod <alex@macleod.io>
    evantypanski and Alexendoo authored Sep 30, 2022
    Configuration menu
    Copy the full SHA
    85b8ff7 View commit details
    Browse the repository at this point in the history
  5. Add test case where FnMut used once needs &mut

    Evan Typanski committed Sep 30, 2022
    Configuration menu
    Copy the full SHA
    dbadf37 View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#9556 - evantypanski:et/issue-9369, r=Alexendoo

    [`redundant_closure`] Fix suggestion causes error for `impl FnMut`
    
    Fixes rust-lang#9369
    
    changelog: [`redundant_closure`] Fix suggestion causes error with `impl FnMut` types
    bors committed Sep 30, 2022
    Configuration menu
    Copy the full SHA
    a78551b View commit details
    Browse the repository at this point in the history
  7. Fix rust-lang#9544

    c410-f3r committed Sep 30, 2022
    Configuration menu
    Copy the full SHA
    4876882 View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#9510 - Alexendoo:lintcheck-server2, r=matthia…

    …skrgr
    
    Add `cargo lintcheck --recursive` to check dependencies of crates
    
    r? `@matthiaskrgr`
    
    This just adds the mode without changing how a regular run works
    
    Takes a fair bit longer to run than a `-j4` or regular run
    
    ```
    cargo lintcheck -j4  468.33s user 43.78s system 290% cpu 2:56.42 total
    cargo lintcheck  428.81s user 41.85s system 199% cpu 3:55.37 total
    cargo lintcheck --recursive  679.83s user 45.01s system 210% cpu 5:43.72 total
    ```
    
    But finds more results:
    
    <details>
    <summary>Stats</summary>
    <pre><code>clippy::explicit_counter_loop 0 =&gt; 1
    clippy::needless_question_mark 0 =&gt; 3
    clippy::unnecessary_cast 0 =&gt; 2
    clippy::to_string_in_format_args 0 =&gt; 4
    clippy::deprecated_cfg_attr 0 =&gt; 23
    clippy::redundant_closure 0 =&gt; 9
    clippy::drop_copy 0 =&gt; 4
    clippy::double_must_use 0 =&gt; 1
    clippy::transmute_num_to_bytes 0 =&gt; 9
    clippy::bind_instead_of_map 0 =&gt; 14
    clippy::float_cmp 0 =&gt; 16
    clippy::is_digit_ascii_radix 0 =&gt; 16
    clippy::manual_swap 0 =&gt; 1
    clippy::needless_match 0 =&gt; 2
    clippy::vec_init_then_push 0 =&gt; 1
    clippy::never_loop 0 =&gt; 1
    clippy::option_map_or_none 0 =&gt; 4
    clippy::tabs_in_doc_comments 0 =&gt; 1
    clippy::naive_bytecount 0 =&gt; 1
    clippy::collapsible_if 0 =&gt; 24
    clippy::copy_iterator 0 =&gt; 5
    clippy::unused_io_amount 0 =&gt; 2
    clippy::result_large_err 0 =&gt; 141
    clippy::useless_conversion 0 =&gt; 24
    clippy::flat_map_option 0 =&gt; 8
    clippy::useless_format 0 =&gt; 2
    clippy::module_inception 0 =&gt; 1
    clippy::drop_ref 0 =&gt; 2
    clippy::unnecessary_fold 0 =&gt; 2
    clippy::neg_multiply 0 =&gt; 1
    clippy::while_let_loop 0 =&gt; 6
    clippy::missing_inline_in_public_items 0 =&gt; 37
    clippy::unnecessary_mut_passed 0 =&gt; 1
    unknown_lints 0 =&gt; 15
    clippy::wildcard_dependencies 0 =&gt; 3
    clippy::same_item_push 0 =&gt; 2
    clippy::useless_asref 0 =&gt; 1
    clippy::unnecessary_unwrap 0 =&gt; 4
    clippy::iter_not_returning_iterator 0 =&gt; 5
    clippy::comparison_to_empty 0 =&gt; 10
    clippy::ref_option_ref 0 =&gt; 4
    clippy::unused_peekable 0 =&gt; 1
    clippy::needless_range_loop 0 =&gt; 8
    clippy::absurd_extreme_comparisons 0 =&gt; 2
    clippy::unnecessary_operation 0 =&gt; 2
    clippy::for_kv_map 0 =&gt; 5
    clippy::unnecessary_owned_empty_strings 0 =&gt; 3
    clippy::transmutes_expressible_as_ptr_casts 0 =&gt; 1
    clippy::toplevel_ref_arg 0 =&gt; 2
    clippy::uninit_vec 0 =&gt; 3
    clippy::filter_next 0 =&gt; 1
    clippy::wildcard_in_or_patterns 0 =&gt; 6
    clippy::cast_ptr_alignment 0 =&gt; 48
    clippy::manual_memcpy 0 =&gt; 1
    clippy::assign_op_pattern 0 =&gt; 313
    clippy::unnecessary_lazy_evaluations 0 =&gt; 14
    clippy::println_empty_string 0 =&gt; 2
    clippy::redundant_pattern 0 =&gt; 2
    clippy::declare_interior_mutable_const 0 =&gt; 8
    clippy::large_stack_arrays 0 =&gt; 4
    clippy::match_bool 0 =&gt; 4
    clippy::unicode_not_nfc 0 =&gt; 2075
    clippy::inconsistent_digit_grouping 0 =&gt; 4
    clippy::no_effect_underscore_binding 0 =&gt; 2
    clippy::let_and_return 0 =&gt; 5
    clippy::transmute_ptr_to_ref 0 =&gt; 12
    clippy::op_ref 0 =&gt; 13
    clippy::unnecessary_join 0 =&gt; 4
    clippy::into_iter_on_ref 0 =&gt; 13
    clippy::from_str_radix_10 0 =&gt; 7
    clippy::ptr_offset_with_cast 0 =&gt; 48
    clippy::erasing_op 0 =&gt; 1
    clippy::swap_ptr_to_ref 0 =&gt; 3
    clippy::needless_bitwise_bool 0 =&gt; 2
    clippy::extend_with_drain 0 =&gt; 19
    clippy::only_used_in_recursion 0 =&gt; 4
    clippy::needless_late_init 0 =&gt; 8
    clippy::excessive_precision 0 =&gt; 1959
    clippy::match_ref_pats 0 =&gt; 10
    clippy::unit_arg 0 =&gt; 20
    clippy::bool_comparison 0 =&gt; 4
    clippy::bool_assert_comparison 0 =&gt; 1
    clippy::eq_op 0 =&gt; 6
    clippy::cast_abs_to_unsigned 0 =&gt; 6
    clippy::format_in_format_args 0 =&gt; 1
    clippy::iter_cloned_collect 0 =&gt; 4
    clippy::ptr_eq 0 =&gt; 3
    clippy::needless_bool 0 =&gt; 5
    clippy::transmute_ptr_to_ptr 0 =&gt; 16
    clippy::needless_option_take 0 =&gt; 2
    clippy::flat_map_identity 0 =&gt; 1
    clippy::needless_splitn 0 =&gt; 2
    clippy::blocks_in_if_conditions 0 =&gt; 1
    clippy::write_literal 0 =&gt; 1
    clippy::manual_split_once 0 =&gt; 1
    clippy::result_unit_err 0 =&gt; 36
    clippy::unused_unit 0 =&gt; 11
    clippy::single_match 0 =&gt; 22
    clippy::manual_find 0 =&gt; 3
    clippy::derive_ord_xor_partial_ord 0 =&gt; 6
    clippy::char_lit_as_u8 0 =&gt; 2
    clippy::let_unit_value 0 =&gt; 2
    clippy::needless_continue 0 =&gt; 19
    clippy::zero_sized_map_values 0 =&gt; 4
    clippy::needless_arbitrary_self_type 0 =&gt; 6
    clippy::partialeq_to_none 0 =&gt; 11
    clippy::partialeq_ne_impl 0 =&gt; 1
    clippy::invalid_upcast_comparisons 0 =&gt; 1
    clippy::mut_range_bound 0 =&gt; 4
    clippy::match_result_ok 0 =&gt; 2
    clippy::ptr_arg 0 =&gt; 8
    clippy::iter_nth_zero 0 =&gt; 18
    clippy::needless_for_each 0 =&gt; 1
    clippy::manual_unwrap_or 0 =&gt; 1
    clippy::transmute_int_to_float 0 =&gt; 6
    clippy::cast_slice_from_raw_parts 0 =&gt; 1
    clippy::match_wild_err_arm 0 =&gt; 2
    clippy::match_like_matches_macro 4 =&gt; 116
    clippy::enum_glob_use 50 =&gt; 380
    clippy::get_first 3 =&gt; 33
    clippy::needless_doctest_main 10 =&gt; 26
    clippy::struct_excessive_bools 19 =&gt; 51
    clippy::cast_possible_wrap 46 =&gt; 538
    clippy::manual_string_new 10 =&gt; 27
    clippy::match_same_arms 53 =&gt; 1039
    clippy::manual_non_exhaustive 1 =&gt; 33
    clippy::redundant_pattern_matching 2 =&gt; 13
    clippy::new_without_default 5 =&gt; 73
    clippy::option_as_ref_deref 2 =&gt; 9
    clippy::unwrap_or_else_default 2 =&gt; 4
    clippy::case_sensitive_file_extension_comparisons 6 =&gt; 9
    clippy::cast_precision_loss 45 =&gt; 110
    clippy::needless_pass_by_value 26 =&gt; 187
    clippy::redundant_closure_for_method_calls 170 =&gt; 539
    clippy::let_underscore_drop 33 =&gt; 133
    clippy::single_match_else 51 =&gt; 138
    clippy::needless_borrow 24 =&gt; 382
    clippy::redundant_else 37 =&gt; 151
    clippy::type_complexity 2 =&gt; 22
    clippy::ptr_as_ptr 93 =&gt; 1135
    clippy::needless_lifetimes 7 =&gt; 100
    clippy::single_char_add_str 2 =&gt; 22
    clippy::similar_names 99 =&gt; 352
    clippy::cargo_common_metadata 25 =&gt; 276
    clippy::int_plus_one 1 =&gt; 2
    clippy::missing_safety_doc 9 =&gt; 152
    clippy::redundant_slicing 2 =&gt; 13
    clippy::mut_mut 2 =&gt; 17
    clippy::derive_partial_eq_without_eq 8 =&gt; 141
    clippy::derive_hash_xor_eq 2 =&gt; 20
    clippy::from_iter_instead_of_collect 2 =&gt; 17
    clippy::verbose_bit_mask 1 =&gt; 8
    clippy::too_many_lines 58 =&gt; 162
    clippy::module_name_repetitions 178 =&gt; 1104
    clippy::explicit_into_iter_loop 12 =&gt; 32
    clippy::cast_lossless 45 =&gt; 478
    clippy::many_single_char_names 9 =&gt; 23
    clippy::unnested_or_patterns 27 =&gt; 127
    clippy::upper_case_acronyms 5 =&gt; 29
    clippy::needless_return 5 =&gt; 97
    clippy::precedence 1 =&gt; 11
    clippy::len_zero 2 =&gt; 70
    clippy::manual_strip 2 =&gt; 30
    clippy::derivable_impls 2 =&gt; 12
    clippy::unused_self 20 =&gt; 187
    clippy::enum_variant_names 1 =&gt; 6
    clippy::self_named_constructors 1 =&gt; 3
    clippy::explicit_auto_deref 19 =&gt; 314
    clippy::semicolon_if_nothing_returned 137 =&gt; 1861
    clippy::should_implement_trait 1 =&gt; 7
    clippy::expl_impl_clone_on_copy 159 =&gt; 1318
    clippy::stable_sort_primitive 4 =&gt; 12
    clippy::mem_replace_with_default 7 =&gt; 46
    clippy::borrow_deref_ref 5 =&gt; 140
    clippy::large_enum_variant 1 =&gt; 4
    clippy::map_unwrap_or 30 =&gt; 203
    clippy::zero_ptr 3 =&gt; 25
    clippy::filter_map_next 2 =&gt; 6
    clippy::identity_op 5 =&gt; 76
    clippy::checked_conversions 1 =&gt; 8
    clippy::len_without_is_empty 9 =&gt; 47
    clippy::missing_errors_doc 372 =&gt; 2333
    clippy::fn_params_excessive_bools 3 =&gt; 7
    clippy::single_component_path_imports 6 =&gt; 28
    clippy::unreadable_literal 366 =&gt; 9814
    clippy::field_reassign_with_default 1 =&gt; 5
    clippy::redundant_clone 1 =&gt; 8
    clippy::cloned_instead_of_copied 36 =&gt; 78
    clippy::too_many_arguments 4 =&gt; 22
    clippy::option_map_unit_fn 7 =&gt; 9
    clippy::extra_unused_lifetimes 1 =&gt; 24
    clippy::unnecessary_wraps 26 =&gt; 128
    clippy::used_underscore_binding 1 =&gt; 50
    clippy::inconsistent_struct_constructor 2 =&gt; 7
    clippy::manual_range_contains 9 =&gt; 120
    clippy::map_clone 7 =&gt; 46
    clippy::cast_slice_different_sizes 1 =&gt; 4
    clippy::missing_panics_doc 114 =&gt; 603
    renamed_and_removed_lints 3 =&gt; 9
    clippy::items_after_statements 155 =&gt; 309
    clippy::inefficient_to_string 5 =&gt; 6
    clippy::comparison_chain 1 =&gt; 19
    clippy::crate_in_macro_def 3 =&gt; 6
    clippy::write_with_newline 2 =&gt; 36
    clippy::manual_saturating_arithmetic 1 =&gt; 2
    clippy::clone_on_copy 1 =&gt; 86
    clippy::negative_feature_names 3 =&gt; 16
    clippy::redundant_field_names 112 =&gt; 1013
    clippy::from_over_into 2 =&gt; 28
    clippy::wildcard_imports 178 =&gt; 376
    clippy::unusual_byte_groupings 19 =&gt; 65
    clippy::option_option 2 =&gt; 10
    clippy::nonminimal_bool 1 =&gt; 17
    clippy::borrow_as_ptr 2 =&gt; 172
    clippy::redundant_static_lifetimes 24 =&gt; 1701
    clippy::or_fun_call 1 =&gt; 63
    clippy::single_char_pattern 3 =&gt; 79
    clippy::explicit_iter_loop 72 =&gt; 148
    clippy::collapsible_else_if 2 =&gt; 27
    clippy::manual_str_repeat 1 =&gt; 6
    clippy::if_same_then_else 3 =&gt; 31
    clippy::while_let_on_iterator 4 =&gt; 28
    clippy::multiple_crate_versions 5 =&gt; 19
    clippy::cast_possible_truncation 115 =&gt; 1172
    clippy::explicit_deref_methods 1 =&gt; 38
    clippy::default_trait_access 48 =&gt; 130
    clippy::question_mark 2 =&gt; 28
    clippy::must_use_candidate 612 =&gt; 5369
    clippy::manual_map 1 =&gt; 12
    clippy::bool_to_int_with_if 2 =&gt; 15
    clippy::doc_markdown 202 =&gt; 1709
    clippy::cast_sign_loss 60 =&gt; 477
    clippy::wrong_self_convention 11 =&gt; 45
    clippy::transmute_float_to_int 6 =&gt; 18
    clippy::return_self_not_must_use 66 =&gt; 736
    clippy::range_plus_one 1 =&gt; 36
    clippy::manual_assert 11 =&gt; 62
    clippy::trivially_copy_pass_by_ref 40 =&gt; 189
    clippy::match_on_vec_items 2 =&gt; 7
    clippy::inline_always 59 =&gt; 1079
    clippy::if_not_else 31 =&gt; 205
    clippy::implicit_clone 10 =&gt; 32
    clippy::match_wildcard_for_single_variants 16 =&gt; 101
    clippy::doc_link_with_quotes 7 =&gt; 35
    clippy::redundant_feature_names 4 =&gt; 41
    </code></pre></details>
    
    changelog: none
    bors committed Sep 30, 2022
    Configuration menu
    Copy the full SHA
    31b1741 View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2022

  1. Configuration menu
    Copy the full SHA
    0867c64 View commit details
    Browse the repository at this point in the history
  2. bless clippy

    WaffleLapkin committed Oct 1, 2022
    Configuration menu
    Copy the full SHA
    8dfbad9 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#101986 - WaffleLapkin:move_lint_note_to_the_b…

    …ottom, r=estebank
    
    Move lint level source explanation to the bottom
    
    So, uhhhhh
    
    r? `@estebank`
    
    ## User-facing change
    
    "note: `#[warn(...)]` on by default" and such are moved to the bottom of the diagnostic:
    ```diff
    -   = note: `#[warn(unsupported_calling_conventions)]` on by default
       = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
       = note: for more information, see issue rust-lang#87678 <rust-lang#87678>
    +   = note: `#[warn(unsupported_calling_conventions)]` on by default
    ```
    
    Why warning is enabled is the least important thing, so it shouldn't be the first note the user reads, IMO.
    
    ## Developer-facing change
    
    `struct_span_lint` and similar methods have a different signature.
    
    Before: `..., impl for<'a> FnOnce(LintDiagnosticBuilder<'a, ()>)`
    After: `..., impl Into<DiagnosticMessage>, impl for<'a, 'b> FnOnce(&'b mut DiagnosticBuilder<'a, ()>) -> &'b mut DiagnosticBuilder<'a, ()>`
    
    The reason for this is that `struct_span_lint` needs to edit the diagnostic _after_ `decorate` closure is called. This also makes lint code a little bit nicer in my opinion.
    
    Another option is to use `impl for<'a> FnOnce(LintDiagnosticBuilder<'a, ()>) -> DiagnosticBuilder<'a, ()>` altough I don't _really_ see reasons to do `let lint = lint.build(message)` everywhere.
    
    ## Subtle problem
    
    By moving the message outside of the closure (that may not be called if the lint is disabled) `format!(...)` is executed earlier, possibly formatting `Ty` which may call a query that trims paths that crashes the compiler if there were no warnings...
    
    I don't think it's that big of a deal, considering that we move from `format!(...)` to `fluent` (which is lazy by-default) anyway, however this required adding a workaround which is unfortunate.
    
    ## P.S.
    
    I'm sorry, I do not how to make this PR smaller/easier to review. Changes to the lint API affect SO MUCH 😢
    bors committed Oct 1, 2022
    Configuration menu
    Copy the full SHA
    9e8f53d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3757a0e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    418b30b View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#9568 - matthiaskrgr:tools_util_bump, r=flip1995

    rustc_tool_utils: bump version in anticipation of a new release
    
    cc rust-lang/rust-clippy#9553
    
    After this is merged, I will publish the 0.2.1 version to crates.io, and make another PR that switches clippy to use the dependency from crates.io.
    The source can still be kept in the clippy repo though imo.
    
    This will allow miri and clippy to "share" the crate in the rustc repo once they both depend on it.
    
    reopen of rust-lang#9561
    
    changelog: release `rustc_tools_util` on `Crates.io`.
    bors committed Oct 1, 2022
    Configuration menu
    Copy the full SHA
    8030ee9 View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#9567 - rust-lang:doc-link-with-code, r=Alexendoo

    avoid doc-link-with-quotes in code blocks
    
    This fixes rust-lang#8961 by moving the lint into the docs code, thus being able to re-use the pulldown-cmark parser and simplifying the code.
    
    ---
    
    changelog: none
    bors committed Oct 1, 2022
    Configuration menu
    Copy the full SHA
    8da2429 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ce609c6 View commit details
    Browse the repository at this point in the history
  9. use is_integer_literal more

    llogiq committed Oct 1, 2022
    Configuration menu
    Copy the full SHA
    eef5d47 View commit details
    Browse the repository at this point in the history
  10. Auto merge of rust-lang#9569 - matthiaskrgr:rtu_from_cratesio, r=xFre…

    …dnet
    
    use rustc_tools_util dependency from crates.io instead of this repo.
    
    Fixes rust-lang#9553
    
    changelog: none
    bors committed Oct 1, 2022
    Configuration menu
    Copy the full SHA
    9b6b452 View commit details
    Browse the repository at this point in the history
  11. Implement manual_clamp lint

    Xaeroxe committed Oct 1, 2022
    Configuration menu
    Copy the full SHA
    b221184 View commit details
    Browse the repository at this point in the history
  12. Auto merge of rust-lang#9484 - Xaeroxe:clamping-without-clamp, r=Alex…

    …endoo
    
    Implement `manual_clamp` lint
    
    Fixes rust-lang#9477
    Fixes rust-lang#6751
    
    Identifies common patterns where usage of the `clamp` function would be more succinct and clear, and suggests using the `clamp` function instead.
    
    changelog: [`manual_clamp`]: Implement manual_clamp lint
    bors committed Oct 1, 2022
    Configuration menu
    Copy the full SHA
    64243c6 View commit details
    Browse the repository at this point in the history
  13. Remove unused .fixed files

    Alexendoo committed Oct 1, 2022
    Configuration menu
    Copy the full SHA
    5a54db1 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    a834ac9 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    52a68dc View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2022

  1. Auto merge of rust-lang#9509 - schubart:fix_sorting, r=llogiq

    Fix sorting in ` cargo dev update_lints` script
    
    changelog: none
    
    The old code cloned and sorted `usable_lints` into `sorted_usable_lints`, but then failed to do anything with `sorted_usable_lints`.
    
    This was discovered by my new `collection_is_never_read` lint (rust-lang#9267) that I'm working on!
    
    Fix: I renamed the sorted vector to `usable_lints`.  Therefore it now gets used where the unsorted one was used previously.
    bors committed Oct 2, 2022
    Configuration menu
    Copy the full SHA
    cb8da67 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#9573 - Alexendoo:needless-borrowed-ref-slice,…

    … r=dswij
    
    lint nested patterns and slice patterns in `needless_borrowed_reference`
    
    Now lints in positions other than top level, e.g. `Some(&ref a)`. Or patterns are excluded as that can cause issues
    
    Slice patterns of `ref`s are now linted, e.g. `&[ref a, ref b]`. An easy one to walk into as you might expect that to match against a slice you should use `&[]`,  then to get around a `cannot move out of type [T]` error you apply a `ref`
    
    changelog: [`needless_borrowed_reference`]: lint nested patterns and slice patterns
    bors committed Oct 2, 2022
    Configuration menu
    Copy the full SHA
    5d837b5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    90b446f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2c04c1a View commit details
    Browse the repository at this point in the history
  5. revert manual_assert suggestion refactor

    Because `Sugg` helper does not simplify multiple negations
    kraktus committed Oct 2, 2022
    Configuration menu
    Copy the full SHA
    a35734c View commit details
    Browse the repository at this point in the history
  6. fix indentation

    kraktus committed Oct 2, 2022
    Configuration menu
    Copy the full SHA
    22be60b View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#9571 - rust-lang:refactor-lit-ints, r=Jarcho

    use `is_integer_literal` more
    
    I noticed that we have the `is_integer_literal` function in our `clippy_utils`, yet almost everywhere people still match int literal expressions manually. So I searched for instances to replace and shorten the code a bit.
    
    ---
    
    changelog: none
    bors committed Oct 2, 2022
    Configuration menu
    Copy the full SHA
    d6d5ecd View commit details
    Browse the repository at this point in the history
  8. fix tests

    kraktus committed Oct 2, 2022
    Configuration menu
    Copy the full SHA
    3ab02aa View commit details
    Browse the repository at this point in the history
  9. Auto merge of rust-lang#9577 - kraktus:unnecessary_cast, r=llogiq

    [`unnecessary_cast`] add parenthesis when negative number uses a method
    
    fix rust-lang#9563
    
    The issue was probably introduced by 90fe3be
    
    changelog: [`unnecessary_cast`] add parenthesis when negative number uses a method
    
    r? llogiq
    bors committed Oct 2, 2022
    Configuration menu
    Copy the full SHA
    ac12011 View commit details
    Browse the repository at this point in the history
  10. let unnecessary_cast work for trivial non_literal expressions

    Signed-off-by: TennyZhuang <zty0826@gmail.com>
    TennyZhuang committed Oct 2, 2022
    Configuration menu
    Copy the full SHA
    081f739 View commit details
    Browse the repository at this point in the history
  11. ignore the lint on some test files

    Signed-off-by: TennyZhuang <zty0826@gmail.com>
    TennyZhuang committed Oct 2, 2022
    Configuration menu
    Copy the full SHA
    f204398 View commit details
    Browse the repository at this point in the history
  12. extract common codes

    Signed-off-by: TennyZhuang <zty0826@gmail.com>
    TennyZhuang committed Oct 2, 2022
    Configuration menu
    Copy the full SHA
    bff811b View commit details
    Browse the repository at this point in the history
  13. fix some logics

    Signed-off-by: TennyZhuang <zty0826@gmail.com>
    TennyZhuang committed Oct 2, 2022
    Configuration menu
    Copy the full SHA
    c9b9314 View commit details
    Browse the repository at this point in the history
  14. Auto merge of rust-lang#9479 - kraktus:manual_assert2, r=llogiq

    [`manual_assert`]: Preserve comments in the suggestion
    
    close rust-lang/rust-clippy#7730
    
    changelog: [`manual_assert`]: Preserve comments in the suggestion
    bors committed Oct 2, 2022
    Configuration menu
    Copy the full SHA
    11a6d19 View commit details
    Browse the repository at this point in the history
  15. Auto merge of rust-lang#9576 - TennyZhuang:unnecessary_cast_for_non_l…

    …iteral_expr, r=llogiq
    
    let unnecessary_cast work for trivial non_literal expressions
    
    Signed-off-by: TennyZhuang <zty0826@gmail.com>
    
    ---
    
    changelog: [`unnecessary_cast`]: fix for trivial non_literal expressions
    
    Fixes rust-lang#9562
    bors committed Oct 2, 2022
    Configuration menu
    Copy the full SHA
    f8ba192 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    8e7af6b View commit details
    Browse the repository at this point in the history
  17. Fix and improve internal lint checking for match_type usages

    * Check for `const`s and `static`s from external crates
    * Check for `LangItem`s
    * Handle inherent functions which have the same name as a field
    * Also check the following functions:
        * `match_trait_method`
        * `match_def_path`
        * `is_expr_path_def_path`
        * `is_qpath_def_path`
    * Handle checking for a constructor to a diagnostic item or `LangItem`
    Jarcho committed Oct 2, 2022
    Configuration menu
    Copy the full SHA
    162aa19 View commit details
    Browse the repository at this point in the history
  18. Auto merge of rust-lang#9574 - Alexendoo:unused-fixed, r=Jarcho

    Remove unused `.fixed` files, only run asm_syntax doctests on x86
    
    Two small changes, removes some unused `.fixed` and makes `clippy_lints` doctests pass on non x86 arches
    
    changelog: none
    bors committed Oct 2, 2022
    Configuration menu
    Copy the full SHA
    0341198 View commit details
    Browse the repository at this point in the history
  19. fallout: fix tests to allow uninlined_format_args

    In order to switch `clippy::uninlined_format_args` from pedantic to
    style, all existing tests must not raise a warning. I did not want to
    change the actual tests, so this is a relatively minor change that:
    
    * add `#![allow(clippy::uninlined_format_args)]` where needed
    * normalizes all allow/deny/warn attributes
       * all allow attributes are grouped together
       * sorted alphabetically
       * the `clippy::*` attributes are listed separate from the other ones.
       * deny and warn attributes are listed before the allowed ones
    
    changelog: none
    nyurik committed Oct 2, 2022
    Configuration menu
    Copy the full SHA
    eb39702 View commit details
    Browse the repository at this point in the history
  20. Auto merge of rust-lang#7962 - Jarcho:fix_match_type_on_diagnostic_it…

    …ems, r=llogiq
    
    Fix and improve `match_type_on_diagnostic_item`
    
    This extracts the fix for the lint out of rust-lang#7647. There's still a couple of other functions to check, but at least this will get lint working again.
    
    The two added util functions (`is_diagnostic_item` and `is_lang_item`) are needed to handle `DefId` for unit and tuple struct/variant constructors. The `rustc_diagnostic_item` and `lang` attributes are attached to the struct/variant `DefId`, but most of the time they are used through their constructors which have a different `DefId`. The two utility functions will check if the `DefId` is for a constructor and switch to the associated struct/variant `DefId`.
    
    There does seem to be a bug on rustc's side where constructor `DefId`s from external crates seem to be returning `DefKind::Variant` instead of `DefKind::Ctor()`. There's a workaround put in right.
    
    changelog: None
    bors committed Oct 2, 2022
    Configuration menu
    Copy the full SHA
    bef93d3 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    649d443 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    38236a7 View commit details
    Browse the repository at this point in the history
  23. Workaround rustc bug

    Jarcho committed Oct 2, 2022
    Configuration menu
    Copy the full SHA
    26bb366 View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2022

  1. Auto merge of rust-lang#8762 - Jarcho:visitor, r=Jarcho

    Replace `expr_visitor` with  `for_each_expr`
    
    This is a minor change which uses `ControlFlow` rather than a boolean. This also runs the visitor rather than returning the visitor, which results in a small readability win as well.
    
    changelog: None
    bors committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    2be6c4a View commit details
    Browse the repository at this point in the history
  2. let upper_case_acronyms check the enum name

    Signed-off-by: TennyZhuang <zty0826@gmail.com>
    TennyZhuang committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    bf18768 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7747032 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    15431b3 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#9580 - TennyZhuang:upper_case_acronyms-enum, …

    …r=llogiq
    
    let `upper_case_acronyms` check the enum name
    
    Signed-off-by: TennyZhuang <zty0826@gmail.com>
    
    Fix rust-lang#9579
    
    changelog: [`upper_case_acronyms`]: check the enum name
    bors committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    18e10ca View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f1c831a View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#9549 - royrustdev:manual_saturating_add, r=ll…

    …ogiq
    
    new `implicit_saturating_add` lint
    
    This fixes rust-lang#9393
    
    If you added a new lint, here's a checklist for things that will be
    checked during review or continuous integration.
    
    - \[x] 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`
    
    ---
    
    changelog: add [`manual_saturating_add`] lint
    bors committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    09e6c23 View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#9581 - ebobrow:mul-add-negative, r=Manishearth

    `suboptimal_flops` lint for multiply and subtract
    
    fixes rust-lang#9526
    
    changelog: [`suboptimal_flops`] lint for multiply and subtract
    bors committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    5825ae7 View commit details
    Browse the repository at this point in the history
  9. Address comments

    c410-f3r committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    99363fe View commit details
    Browse the repository at this point in the history
  10. Auto merge of rust-lang#9559 - c410-f3r:arith, r=Alexendoo

    Fix rust-lang#9544
    
    Fix rust-lang#9544
    
    r? `@Alexendoo`
    
    changelog: [`arithmetic_side_effects`]: Fix false negative for `CustomType / usize`, `CustomType * float` and similar
    bors committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    e8c1b54 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    2a6a98f View commit details
    Browse the repository at this point in the history
  12. Dogfood

    c410-f3r committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    a44914f View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2022

  1. Auto merge of rust-lang#9547 - nyurik:capt, r=flip1995

    fallout: fix tests to allow uninlined_format_args
    
    In order to switch `clippy::uninlined_format_args` from pedantic to style, all existing tests must not raise a warning. I did not want to change the actual tests, so this is a relatively minor change that:
    
    * add `#![allow(clippy::uninlined_format_args)]` where needed
    * normalizes all allow/deny/warn attributes
       * all allow attributes are grouped together
       * sorted alphabetically
       * the `clippy::*` attributes are listed separate from the other ones.
       * deny and warn attributes are listed before the allowed ones
    
    See also rust-lang/rust-clippy#9233, rust-lang/rust-clippy#9525, rust-lang/rust-clippy#9527
    
    cc: `@llogiq` `@Alexendoo`
    
    changelog: none
    bors committed Oct 4, 2022
    Configuration menu
    Copy the full SHA
    2f90b2a View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#9587 - c410-f3r:arith, r=Alexendoo

    [arithmetic-side-effects] Do not ignore literal references
    
    To my utter surprise, `rustc` does does not warn stuff like `let n: u8 = &255 + &1` or `let n: u8 = 255 + &1`.
    
    changelog: [arithmetic-side-effects] Do not ignore literal references
    bors committed Oct 4, 2022
    Configuration menu
    Copy the full SHA
    425e1ea View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    da16cc1 View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2022

  1. lint::unsafe_removed_from_name: fix false positive result when allowed

    * Allowing `unsafe_removed_from_name` on imports produces a false
    positive on `useless_attribute`.
    
    Fixes: rust-lang#9197
    
    Signed-off-by: Andy-Python-Programmer <andypythonappdeveloper@gmail.com>
    Andy-Python-Programmer committed Oct 5, 2022
    Configuration menu
    Copy the full SHA
    14f9f2b View commit details
    Browse the repository at this point in the history
  2. Add disallowed_macros lint

    Alexendoo committed Oct 5, 2022
    Configuration menu
    Copy the full SHA
    86c86c3 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#9495 - Alexendoo:disallowed-macros, r=Jarcho

    Add `disallowed_macros` lint
    
    Closes rust-lang#7790
    Fixes rust-lang#9558
    
    `clippy_utils::def_path_res` already resolved macro definitions which is nice, it just needed a tweak to be able to disambiguate e.g. `std::vec` the module & `std::vec` the macro, and `serde::Serialize` the trait & `serde::Serialize` the derive macro
    
    changelog: new lint: [`disallowed_macros`]
    changelog: [`disallowed_methods`], [`disallowed_types`]: Fix false negative when a type/fn/macro share the same path
    bors committed Oct 5, 2022
    Configuration menu
    Copy the full SHA
    e687bed View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9226066 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#9586 - Alexendoo:format-args-commas, r=Manish…

    …earth
    
    FormatArgsExpn: Find comma spans and ignore weird proc macro spans
    
    Fixes the following cases:
    
    A missing `, 1` from the `expect_fun_call` suggestion:
    
    ```rust
    Some(()).expect(&format!("{x} {}", 1));
    ```
    ```
    warning: use of `expect` followed by a function call
     --> t.rs:7:14
      |
    7 |     Some(()).expect(&format!("{x} {}", 1));
      |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| panic!("{x} {}"))`
    ```
    
    The suggestion removing from the comma in the comment rather than the one after the format string:
    
    ```rust
    println!(
        "{}",
        // a comment, with a comma in it
        x
    );
    ```
    ```
    warning: variables can be used directly in the `format!` string
      --> t.rs:9:5
       |
    9  | /     println!(
    10 | |         "{}",
    11 | |         // a comment, with a comma in it
    12 | |         x
    13 | |     );
       | |_____^
       |
    help: change this to
       |
    10 ~         "{x}",
    11 ~         // a comment
       |
    ```
    
    It also no longer accepts expansions where a format string or argument has a "weird" proc macro span, that is one where the literal/expression it outputs has the span of one of its inputs. Kind of like a `format_args` specific `clippy_utils::is_from_proc_macro`, e.g. `format!(indoc! {" ... "})`
    
    changelog: [`expect_fun_call`]: Fix suggestion for `format!` using captured variables
    changelog: [`print_literal`], [`write_literal`], [`uninlined_format_args`]: Fix suggestion when following a comment including a comma
    bors committed Oct 5, 2022
    Configuration menu
    Copy the full SHA
    887ba0c View commit details
    Browse the repository at this point in the history

Commits on Oct 6, 2022

  1. Configuration menu
    Copy the full SHA
    e2808af View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ad1814d View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#9596 - flip1995:rustup, r=flip1995

    Rustup
    
    r? `@ghost`
    
    changelog: none
    bors committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    ac0e10a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    27f2f0a View commit details
    Browse the repository at this point in the history
  5. Update Cargo.lock

    flip1995 committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    db490d0 View commit details
    Browse the repository at this point in the history
  6. lint: fix a few comments

    nyurik committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    c251f8d View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#9598 - nyurik:fix-comment, r=Alexendoo

    lint: fix a few comments
    
    minor cleanup per `@Alexendoo` [comment](rust-lang/rust-clippy#9586 (comment))
    
    changelog: none
    bors committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    45343e2 View commit details
    Browse the repository at this point in the history
  8. Add a temporary workaround for multiline formart arg inlining

    per suggestion in
    rust-lang#102729 (comment)
    
    workaround for an internal crash when handling multi-line format
    argument inlining.
    nyurik committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    cfd6c8d View commit details
    Browse the repository at this point in the history
  9. Auto merge of rust-lang#9599 - nyurik:inline-crash, r=flip1995

    Add a temporary workaround for  multiline formart arg inlining
    
    per suggestion in
    rust-lang#102729 (comment)
    
    workaround for an internal crash when handling multi-line format argument inlining.
    
    changelog: none
    
    (no point for changelog because it is still a new lint being introduced)
    bors committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    6dd0c3a View commit details
    Browse the repository at this point in the history
  10. Auto merge of rust-lang#9593 - Andy-Python-Programmer:master, r=llogiq

    lint::unsafe_removed_from_name: fix false positive result when allowed
    
    changelog: [`unsafe_removed_from_name`] Fix allowing on imports produces a false positive on `useless_attribute`.
    
    Fixes: rust-lang#9197
    
    Signed-off-by: Andy-Python-Programmer <andypythonappdeveloper@gmail.com>
    bors committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    8f1ebdd View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    2b30ce0 View commit details
    Browse the repository at this point in the history