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

Merged
merged 117 commits into from
May 20, 2023
Merged

Update Clippy #111799

merged 117 commits into from
May 20, 2023

Commits on Feb 1, 2023

  1. Configuration menu
    Copy the full SHA
    a408e76 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4931f45 View commit details
    Browse the repository at this point in the history
  3. Remove old feature flag in code comment

    Since let_else feature has been stable in 1.65.0, it's now unnecessary
    koka831 committed Feb 1, 2023
    Configuration menu
    Copy the full SHA
    20338fd View commit details
    Browse the repository at this point in the history
  4. Avoid renaming for TupleStruct with multiple arguments

    update spec
    
    fix: move specs in fire
    koka831 committed Feb 1, 2023
    Configuration menu
    Copy the full SHA
    07c8c50 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2023

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

Commits on Apr 29, 2023

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

Commits on Apr 30, 2023

  1. wip

    john-h-k committed Apr 30, 2023
    Configuration menu
    Copy the full SHA
    478555d View commit details
    Browse the repository at this point in the history
  2. WIP

    john-h-k committed Apr 30, 2023
    Configuration menu
    Copy the full SHA
    1eff408 View commit details
    Browse the repository at this point in the history
  3. WIP

    john-h-k committed Apr 30, 2023
    Configuration menu
    Copy the full SHA
    0fb3f3b View commit details
    Browse the repository at this point in the history
  4. WIP

    john-h-k committed Apr 30, 2023
    Configuration menu
    Copy the full SHA
    8db21e9 View commit details
    Browse the repository at this point in the history
  5. Working

    john-h-k committed Apr 30, 2023
    Configuration menu
    Copy the full SHA
    b9788fe View commit details
    Browse the repository at this point in the history

Commits on May 2, 2023

  1. Make the BUG_REPORT_URL configurable by tools

    This greatly simplifies how hard it is to set a custom bug report url; previously tools had to copy
    the entire hook implementation.
    
    - Switch clippy to the new hook
    
      This also adds a `extra_info` callback so clippy can include its own version number, which differs
      from rustc's.
    
    - Call `install_ice_hook` in rustfmt
    jyn514 committed May 2, 2023
    Configuration menu
    Copy the full SHA
    a233bd5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    37127b8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f7595e0 View commit details
    Browse the repository at this point in the history
  4. Update trait_bounds.rs

    john-h-k committed May 2, 2023
    Configuration menu
    Copy the full SHA
    cbd0135 View commit details
    Browse the repository at this point in the history
  5. Update trait_bounds.rs

    john-h-k committed May 2, 2023
    Configuration menu
    Copy the full SHA
    122793b View commit details
    Browse the repository at this point in the history

Commits on May 3, 2023

  1. Bump README copyright

    alnoki committed May 3, 2023
    Configuration menu
    Copy the full SHA
    477c8b3 View commit details
    Browse the repository at this point in the history

Commits on May 4, 2023

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

Commits on May 5, 2023

  1. Rollup merge of rust-lang#108801 - fee1-dead-contrib:c-str, r=compile…

    …r-errors
    
    Implement RFC 3348, `c"foo"` literals
    
    RFC: rust-lang/rfcs#3348
    Tracking issue: rust-lang#105723
    Dylan-DPC committed May 5, 2023
    Configuration menu
    Copy the full SHA
    a48c735 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7e9abb3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    68eb864 View commit details
    Browse the repository at this point in the history
  4. redundant_pattern_matching

    disco07 committed May 5, 2023
    Configuration menu
    Copy the full SHA
    afa2741 View commit details
    Browse the repository at this point in the history
  5. redundant_pattern_matching

    disco07 committed May 5, 2023
    Configuration menu
    Copy the full SHA
    d2bbe76 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d80ca09 View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#111255 - flip1995:clippyup, r=Manishearth

    Update Clippy
    
    r? `@Manishearth`
    bors committed May 5, 2023
    Configuration menu
    Copy the full SHA
    5889ecd View commit details
    Browse the repository at this point in the history

Commits on May 6, 2023

  1. Minimizing changes

    blyxyas committed May 6, 2023
    Configuration menu
    Copy the full SHA
    2a4571d View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#110989 - jyn514:bug-report-url, r=WaffleLapkin

    Make the BUG_REPORT_URL configurable by tools
    
    This greatly simplifies how hard it is to set a custom bug report url; previously tools had to copy
    the entire hook implementation.
    
    I haven't changed clippy in case they want to make the change upstream instead of the subtree, but
    I'm happy to do so here if the maintainers want - cc ````@rust-lang/clippy````
    
    Fixes rust-lang#109486.
    matthiaskrgr committed May 6, 2023
    Configuration menu
    Copy the full SHA
    0b7acaa View commit details
    Browse the repository at this point in the history
  3. Add missing word "are"

    cakebaker committed May 6, 2023
    Configuration menu
    Copy the full SHA
    f4b8cb1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9e535f6 View commit details
    Browse the repository at this point in the history

Commits on May 7, 2023

  1. Configuration menu
    Copy the full SHA
    630f31c View commit details
    Browse the repository at this point in the history
  2. fix error test

    disco07 committed May 7, 2023
    Configuration menu
    Copy the full SHA
    450a22f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    39db64e View commit details
    Browse the repository at this point in the history
  4. changes from review: add FIXME to clippy and change subst_identity to…

    … skip_binder in mir subst methods
    kylematsuda committed May 7, 2023
    Configuration menu
    Copy the full SHA
    3fc1155 View commit details
    Browse the repository at this point in the history
  5. update a func

    disco07 committed May 7, 2023
    Configuration menu
    Copy the full SHA
    fb6bf1e View commit details
    Browse the repository at this point in the history
  6. Comments

    john-h-k committed May 7, 2023
    Configuration menu
    Copy the full SHA
    5c8a009 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    394b4c1 View commit details
    Browse the repository at this point in the history

Commits on May 8, 2023

  1. Auto merge of rust-lang#10752 - Alexendoo:default-units-macros, r=gir…

    …affate
    
    Ignore expressions from macros in `default_constructed_unit_structs`
    
    changelog: none, should be the same release as the lint itself
    bors committed May 8, 2023
    Configuration menu
    Copy the full SHA
    3aab0dd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    56e8e1a View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#10736 - NotAPenguin0:master, r=Alexendoo

    initial clippy::ref_pattern implementation
    
    This implements a new lint that discourages the use of the `ref` keyword as outlined in rust-lang#9010. I think there are still some things to improve about this lint, but I need some feedback before I can implement those.
    
    - [x] ~~Maybe it's desirable that a quick fix is listed too, instead of a generic `avoid using the ref keyword` lint.~~
    - [x] `let ref x = y` already has a lint (`clippy::toplevel_ref_arg`). This implementation will report this too, so you get two lints for the same issue, which is not great. I don't really know a way around this though.
    - [X] The dogfood test is currently failing locally, though I ran `cargo clippy -- -D clippy::all -D clippy::pedantic` and got no output, so I'm not sure why this is.
    
    Any help with these would be greatly appreciated.
    
    fixes rust-lang#9010
    changelog: [`ref_pattern`]: newly added lint
    bors committed May 8, 2023
    Configuration menu
    Copy the full SHA
    8798c66 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#10757 - cakebaker:add_missing_word, r=Jarcho

    Add missing word "are"
    
    changelog: none
    bors committed May 8, 2023
    Configuration menu
    Copy the full SHA
    e66488a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5491241 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5acc299 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    ba0e7e8 View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#10761 - lochetti:fix_9871, r=Manishearth

    Ignore `borrow_deref_ref` warnings in code from procedural macros.
    
    Don't linting `borrow_deref_ref` if code was generated by procedural macro.
    
    This PR fixes rust-lang/rust-clippy#8971
    
    changelog: [`borrow_deref_ref`] avoiding warnings in macro-generated code
    bors committed May 8, 2023
    Configuration menu
    Copy the full SHA
    90ce1a2 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#109410 - fmease:iat-alias-kind-inherent, r=…

    …compiler-errors
    
    Introduce `AliasKind::Inherent` for inherent associated types
    
    Allows us to check (possibly generic) inherent associated types for well-formedness.
    Type inference now also works properly.
    
    Follow-up to rust-lang#105961. Supersedes rust-lang#108430.
    Fixes rust-lang#106722.
    Fixes rust-lang#108957.
    Fixes rust-lang#109768.
    Fixes rust-lang#109789.
    Fixes rust-lang#109790.
    
    ~Not to be merged before rust-lang#108860 (`AliasKind::Weak`).~
    
    CC `@jackh726`
    r? `@compiler-errors`
    
    `@rustbot` label T-types F-inherent_associated_types
    compiler-errors committed May 8, 2023
    Configuration menu
    Copy the full SHA
    34655df View commit details
    Browse the repository at this point in the history
  10. Fix header

    blyxyas committed May 8, 2023
    Configuration menu
    Copy the full SHA
    4c3e2ff View commit details
    Browse the repository at this point in the history
  11. Auto merge of rust-lang#10584 - blyxyas:fix-wildcard_imports_testsrs,…

    … r=flip1995
    
    fix: `wildcard_imports` ignore `test.rs` files
    
    Adds a check to see if the building crate is a test one, if so, ignore it
    
    ---
    
    Closes rust-lang#10580
    changelog:[`wildcard_imports`]: Add a check to ignore files named `test.rs` and `tests.rs`
    bors committed May 8, 2023
    Configuration menu
    Copy the full SHA
    d696f3b View commit details
    Browse the repository at this point in the history
  12. Auto merge of rust-lang#10735 - alnoki:patch-1, r=dswij

    Bump README copyright
    
    changelog: none
    bors committed May 8, 2023
    Configuration menu
    Copy the full SHA
    b4075e8 View commit details
    Browse the repository at this point in the history

Commits on May 9, 2023

  1. Comments

    john-h-k committed May 9, 2023
    Configuration menu
    Copy the full SHA
    b169bdb View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#10727 - john-h-k:lint/dup-auto-traits, r=Mani…

    …shearth
    
    Extend `trait_duplication_in_bounds` to cover trait objects
    
    This PR extends `trait_duplication_in_bounds` to cover trait objects.
    
    Currently,
    ```rs
    fn foo(_a: &(dyn Any + Send + Send)) {}
    ```
    
    generates no warnings. With this PR, it will complain about a duplicate trait and can remove it
    
    Moved from rust-lang#110991
    
    changelog: [`trait_duplication_in_bounds`]: warn on duplicate trait object constraints
    bors committed May 9, 2023
    Configuration menu
    Copy the full SHA
    77e4d7a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3e8fea6 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#10751 - blyxyas:explain_with_config, r=xFrednet

    Add configuration options to `--explain`
    
    This PR rearranges some modules, taking `metadata_collector` out of `internal_lints` and making public just the necessary functions for `explain()` to use.
    
    The output looks something like this:
    ```sh
    $ cargo run --bin cargo-clippy --manifest-path ../rust-clippy/Cargo.toml -- --explain cognitive_complexity
    ### What it does
    Checks for methods with high cognitive complexity.
    
    ### Why is this bad?
    Methods of high cognitive complexity tend to be hard to
    both read and maintain. Also LLVM will tend to optimize small methods better.
    
    ### Known problems
    Sometimes it's hard to find a way to reduce the
    complexity.
    
    ### Example
    You'll see it when you get the warning.
    
    ========================================
    Configuration for clippy::cognitive_complexity:
    - cognitive-complexity-threshold: The maximum cognitive complexity a function can have (default: 25)
    ```
    
    Fixes rust-lang#9990
    r? `@xFrednet`
    
    ---
    
    changelog: Docs: `cargo clippy --explain LINT` now shows possible configuration options for the explained lint
    [rust-lang#10751](rust-lang/rust-clippy#10751)
    <!-- changelog_checked -->
    bors committed May 9, 2023
    Configuration menu
    Copy the full SHA
    1407c76 View commit details
    Browse the repository at this point in the history
  5. fix reviewer comments

    disco07 committed May 9, 2023
    Configuration menu
    Copy the full SHA
    342ce3d View commit details
    Browse the repository at this point in the history

Commits on May 10, 2023

  1. Drop uplifted clippy::drop_ref

    Urgau committed May 10, 2023
    Configuration menu
    Copy the full SHA
    6af0359 View commit details
    Browse the repository at this point in the history
  2. Drop uplifted clippy::drop_copy

    Urgau committed May 10, 2023
    Configuration menu
    Copy the full SHA
    551f6e6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    22688fc View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    35e5aac View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c5d4b04 View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#10766 - samueltardieu:issue-10710, r=Manishearth

    needless_bool: do not simplify code if it loses comments
    
    Fix rust-lang#10710
    
    changelog: [`needless_bool`]: do not simplify code if it loses comments
    bors committed May 10, 2023
    Configuration menu
    Copy the full SHA
    c56dd3d View commit details
    Browse the repository at this point in the history

Commits on May 11, 2023

  1. fix: warn on empty line outer AttrKind::DocComment

    changelog: [`empty_line_after_doc_comments`]: add lint for checking
    empty lines after rustdoc comments.
    
    Fixes: rust-lang#10395
    jdswensen committed May 11, 2023
    Configuration menu
    Copy the full SHA
    0a4cfbf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3991dd1 View commit details
    Browse the repository at this point in the history
  3. update tests

    disco07 committed May 11, 2023
    Configuration menu
    Copy the full SHA
    c53ceba View commit details
    Browse the repository at this point in the history
  4. add lint manual_next_back

    checks for manual reverse iteration (`.rev().next()`) of a
    `DoubleEndedIterator`
    Icxolu committed May 11, 2023
    Configuration menu
    Copy the full SHA
    a8834bc View commit details
    Browse the repository at this point in the history

Commits on May 12, 2023

  1. Auto merge of rust-lang#10769 - Icxolu:manual_next_back, r=giraffate

    add lint `manual_next_back`
    
    changelog: [`manual_next_back`]: checks for manual reverse iteration (`.rev().next()`) of a `DoubleEndedIterator`
    
    fixes rust-lang#10274
    bors committed May 12, 2023
    Configuration menu
    Copy the full SHA
    3d456ce View commit details
    Browse the repository at this point in the history
  2. Update actions/checkout

    giraffate committed May 12, 2023
    Configuration menu
    Copy the full SHA
    8100a88 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#10771 - giraffate:update_actions_checkout, r=…

    …flip1995
    
    Update actions/checkout
    
    Suppress the warning in GitHub Actions: https://github.com/rust-lang/rust-clippy/actions/runs/4941438718
    
    changelog: none
    bors committed May 12, 2023
    Configuration menu
    Copy the full SHA
    035c457 View commit details
    Browse the repository at this point in the history
  4. Update actions/setup-node

    giraffate committed May 12, 2023
    Configuration menu
    Copy the full SHA
    fce41ce View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#10772 - giraffate:update_actions_setup-node, …

    …r=flip1995
    
    Update actions/setup-node
    
    Follow up of rust-lang/rust-clippy#10771. One warning remains: https://github.com/rust-lang/rust-clippy/actions/runs/4959567213
    
    changelog: none
    bors committed May 12, 2023
    Configuration menu
    Copy the full SHA
    6cbd767 View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#10691 - jdswensen:jds/fix-doc-empty-line, r=J…

    …archo
    
    fix: warn on empty line outer AttrKind::DocComment
    
    changelog: [`empty_line_after_doc_comments`]: add lint for checking empty lines after rustdoc comments.
    
    Fixes: rust-lang#10395
    bors committed May 12, 2023
    Configuration menu
    Copy the full SHA
    fff790b View commit details
    Browse the repository at this point in the history

Commits on May 14, 2023

  1. Configuration menu
    Copy the full SHA
    891fffe View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#10768 - c410-f3r:arith-3, r=Jarcho

    [arithmetic_side_effects] Consider referenced allowed or hard-coded types
    
    Fix rust-lang#10767
    
    ```
    changelog: [`arithmetic_side_effects`]: Do not fire when dealing with allowed or hard-coded types that are referenced.
    ```
    bors committed May 14, 2023
    Configuration menu
    Copy the full SHA
    a167973 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e234dfa View commit details
    Browse the repository at this point in the history
  4. fixing fmt

    lochetti committed May 14, 2023
    Configuration menu
    Copy the full SHA
    df200aa View commit details
    Browse the repository at this point in the history
  5. Rename integer_arithmetic

    c410-f3r committed May 14, 2023
    Configuration menu
    Copy the full SHA
    493b2ae View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    fcb1327 View commit details
    Browse the repository at this point in the history
  7. enhance needless_collect

    Updates `needless_collect` to lint for collecting into a method or
    function argument thats taking an `IntoIterator` (for example `extend`).
    Every `Iterator` trivially implements `IntoIterator` and colleting it
    only causes an unnecessary allocation.
    Icxolu committed May 14, 2023
    Configuration menu
    Copy the full SHA
    84f89f3 View commit details
    Browse the repository at this point in the history
  8. fix rust-lang#10773

    Centri3 committed May 14, 2023
    Configuration menu
    Copy the full SHA
    1190c02 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    a36d9a7 View commit details
    Browse the repository at this point in the history
  10. Auto merge of rust-lang#10778 - Centri3:type-alias-fix, r=llogiq

    Don't emit clippy::useless_conversion on type aliases
    
    Fixes rust-lang#10773
    
    changelog: Enhancement: [`useless_conversion`]: Don't lint on type aliases
    bors committed May 14, 2023
    Configuration menu
    Copy the full SHA
    590c9fc View commit details
    Browse the repository at this point in the history

Commits on May 15, 2023

  1. flip1995: Stepping down from the reviewer rotation

    A step I was trying to avoid for way too long, but sadly necessary now. I hope I
    can come back stronger in a few months.
    flip1995 committed May 15, 2023
    Configuration menu
    Copy the full SHA
    9c6350b View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#10781 - flip1995:stepping-down, r=xFrednet

    flip1995: Stepping down from the reviewer rotation
    
    A step I was trying to avoid for way too long, but sadly necessary now. I hope I can come back stronger in a few months.
    
    More explanation on [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/Stepping.20back.20from.20review.20rotation/near/358384096)
    
    changelog: none
    bors committed May 15, 2023
    Configuration menu
    Copy the full SHA
    c490974 View commit details
    Browse the repository at this point in the history
  3. update test option

    disco07 committed May 15, 2023
    Configuration menu
    Copy the full SHA
    79a8867 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f0be0ee View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    79eb06c View commit details
    Browse the repository at this point in the history

Commits on May 16, 2023

  1. Configuration menu
    Copy the full SHA
    2d9d81f View commit details
    Browse the repository at this point in the history
  2. Remove LangItems::require

    It's just a short wrapper used by `tcx.require_lang_item`. Deleting it
    gives us a negative diff.
    Noratrieb committed May 16, 2023
    Configuration menu
    Copy the full SHA
    fc12637 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ae40b7f View commit details
    Browse the repository at this point in the history

Commits on May 17, 2023

  1. Rollup merge of rust-lang#111648 - Nilstrieb:language-items, r=Waffle…

    …Lapkin
    
    Remove `LangItems::require`
    
    It's just a short wrapper used by `tcx.require_lang_item`. Deleting it gives us a negative diff.
    Dylan-DPC committed May 17, 2023
    Configuration menu
    Copy the full SHA
    506b50e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    591f5f7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0eb364b View commit details
    Browse the repository at this point in the history

Commits on May 18, 2023

  1. Auto merge of rust-lang#10175 - koka831:fix/10171, r=giraffate

    Use original variable name in the suggestion
    
    Fix rust-lang/rust-clippy#10171
    
    ---
    
    changelog: Sugg: [`manual_let_else`]: Now suggest the correct variable name
    [rust-lang#10175](rust-lang/rust-clippy#10175)
    <!-- changelog_checked -->
    bors committed May 18, 2023
    Configuration menu
    Copy the full SHA
    7e18451 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#10337 - EliasHolzmann:fix/10335, r=dswij

    Fix: Some suggestions generated by the option_if_let_else lint did not compile
    
    This addresses a bug in Clippy where the fix suggestend by the `option_if_let_else` lint would not compile for `Result`s which have an impure expression in the `else` branch.
    
    ---
    
    changelog: [`option_if_let_else`]: Fixed incorrect suggestion for `Result`s
    [rust-lang#10337](rust-lang/rust-clippy#10337)
    <!-- changelog_checked -->
    
    Fixes rust-lang#10335.
    bors committed May 18, 2023
    Configuration menu
    Copy the full SHA
    407c352 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#10682 - J-ZhengLi:issue10680, r=dswij

    fix [`invalid_regex`] not recognizing new syntax introduced after regex-1.8.0
    
    fixes: rust-lang#10680
    
    ---
    
    changelog: fix [`invalid_regex`] not recognizing new syntax introduced after regex-1.8.0
    
    bump up `regex-syntax` dependency version to 0.7.0
    bors committed May 18, 2023
    Configuration menu
    Copy the full SHA
    223f518 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#10775 - lochetti:fix_10723, r=xFrednet

    Ignoring `let_underscore_untyped` warnings in code from proc macros
    
    Don't linting let_underscore_untyped if code was generated by procedural macro.
    
    This PR fixes rust-lang/rust-clippy#10723
    
    ---
    
    closes: rust-lang/rust-clippy#10723
    
    changelog: Fix: [`let_underscore_untyped`]: No longer lints inside proc macros
    [rust-lang#10775](rust-lang/rust-clippy#10775)
    <!-- changelog_checked -->
    bors committed May 18, 2023
    Configuration menu
    Copy the full SHA
    f3f6fd8 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#10786 - mickvangelderen:remove-unnecessary-cl…

    …one-from-needless-collect-example, r=Alexendoo
    
    Remove unnecessary `clone` from `needless_collect` example
    
    The example for [clippy::needless_collect](https://rust-lang.github.io/rust-clippy/master/#needless_collect) is written as follows:
    
    ```rust
    let len = iterator.clone().collect::<Vec<_>>().len();
    // should be
    let len = iterator.count();
    ```
    
    With this change, the unnecessary `clone()` is removed and the the standard
    
        ### Example
        ```rust
        // original
        ```
        Use instead:
        ```rust
        // improved
        ```
    
    structure is followed.
    
    Discussion: rust-lang/rust-clippy#10784 (comment)
    
    changelog: [`needless_collect`]: Cleaned up the example in the lint documentation.
    bors committed May 18, 2023
    Configuration menu
    Copy the full SHA
    9cd483d View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#10789 - Centri3:patch-1, r=xFrednet

    fix example heading in `string_slice`
    
    changelog: none
    bors committed May 18, 2023
    Configuration menu
    Copy the full SHA
    cf182b9 View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#10725 - y21:issue9914, r=Jarcho

    don't remove `dbg!` in arbitrary expressions
    
    Fixes rust-lang#9914
    
    The `dbg_macro` lint replaces empty `dbg!` invocations with the empty string in its suggestion, which is not always valid code in certain contexts (e.g. `let _ = dbg!();` becomes `let _ = ;`). This PR changes it to `()`, which should always be valid where `dbg!()` is valid (`dbg!()` with no arguments evaluates to `()`).
    
    It also special-cases "standalone" `dbg!();` expression statements, where it will suggest removing the whole statement entirely like it did before.
    
    changelog: [`dbg_macro`]: don't remove `dbg!()` in arbitrary expressions as it sometimes results in syntax errors
    bors committed May 18, 2023
    Configuration menu
    Copy the full SHA
    815a07e View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#10674 - c410-f3r:macro-lint, r=Jarcho

    Rename `integer_arithmetic`
    
    The lack of official feedback in rust-lang#10200 made me give up on pursuing the matter but after yet another use-case that is not handled by `integer_arithmetic` (rust-lang#10615), I think it is worth trying again.
    
    ---
    
    changelog: Move/Deprecation: Rename `integer_arithmetic` to `arithmetic_side_effects`
    [rust-lang#10674](rust-lang/rust-clippy#10674)
    <!-- changelog_checked -->
    bors committed May 18, 2023
    Configuration menu
    Copy the full SHA
    270cbeb View commit details
    Browse the repository at this point in the history
  9. Auto merge of rust-lang#10753 - disco07:master, r=xFrednet

    redundant_pattern_matching
    
    This PR try to solve this issue rust-lang/rust-clippy#10726,
    but it enter in conflict with another test.
    
    changelog: none
    
    Try to test this:
    ```
    let _w = match x {
         Some(_) => true,
         _ => false,
    };
    ```
    
    this happen:
    ```
     error: match expression looks like `matches!` macro
       --> $DIR/match_expr_like_matches_macro.rs:21:14
        |
     LL |       let _w = match x {
        |  ______________^
     LL | |         Some(_) => true,
     LL | |         _ => false,
     LL | |     };
        | |_____^ help: try this: `matches!(x, Some(_))`
    
    +error: redundant pattern matching, consider using `is_some()`
    +  --> $DIR/match_expr_like_matches_macro.rs:21:14
    +   |
    +LL |       let _w = match x {
    +   |  ______________^
    +LL | |         Some(_) => true,
    +LL | |         _ => false,
    +LL | |     };
    +   | |_____^ help: try this: `x.is_some()`
    +   |
    +   = note: `-D clippy::redundant-pattern-matching` implied by `-D warnings`
    +
    ```
    I need some help to fix this. Thanks
    bors committed May 18, 2023
    Configuration menu
    Copy the full SHA
    22b3196 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    cfa5aa2 View commit details
    Browse the repository at this point in the history
  11. Auto merge of rust-lang#10798 - Alexendoo:unnameable-ty-suggestions, …

    …r=Jarcho
    
    Don't suggest unnameable types in `box_default`, `let_underscore_untyped`
    
    changelog: [`box_default`], [`let_underscore_untyped`]: Don't suggest unnameable types
    bors committed May 18, 2023
    Configuration menu
    Copy the full SHA
    392e955 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    0b3c2ed View commit details
    Browse the repository at this point in the history
  13. Slightly refactor constant evaluation and add detection for empty mac…

    …ro expansion and `cfg`ed statements.
    Jarcho committed May 18, 2023
    Configuration menu
    Copy the full SHA
    5351170 View commit details
    Browse the repository at this point in the history
  14. Improve SpanlessEq

    * Don't consider expansions of different macros to be the same, even if they expand to the same tokens
    * Don't consider `cfg!` expansions to be equal if they check different configs.
    Jarcho committed May 18, 2023
    Configuration menu
    Copy the full SHA
    58132cb View commit details
    Browse the repository at this point in the history

Commits on May 19, 2023

  1. Auto merge of rust-lang#10478 - Jarcho:block_eq, r=xFrednet

    `SpanlessEq` improvements
    
    fixes rust-lang#9775
    
    Also includes a simplification to `consts::constant`'s interface since I was already touching the code.
    
    At the start of `eq_expr` the check:
    ```rust
    if !self.inner.allow_side_effects && left.span.ctxt() != right.span.ctxt() {
        return false;
    }
    ```
    was removed. This was added in 49e2501 to handle `cfg` macros. This is better handled by the newly added `check_ctxt`.
    
    changelog: [various lints]: Don't consider different `cfg!` expansions to be the same unless they are for the same config.
    changelog: [various lints]: Don't consider the expansion of two different macros to be equal, even when they expand to the same token sequence.
    changelog: [various lints]: Don't consider two blocks to be equal if they contain disabled code or empty macro expansions, unless those section contain the exact same token sequence.
    bors committed May 19, 2023
    Configuration menu
    Copy the full SHA
    1e8d2c5 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#10777 - Icxolu:unnecessary_collect, r=xFrednet

    Enhance `needless_collect`: lint in method/function arguments that take an `IntoIterator`
    
    Updates `needless_collect` to also lint `collect` calls in method/function arguments that take an `IntoIterator` (for example `Extend::extend`). Every `Iterator` trivially implements `IntoIterator` and collecting it only causes an unnecessary allocation.
    
    ---
    
    changelog: Enhancement: [`needless_collect`]: Now also detects function arguments, taking a generic `IntoIterator`
    [rust-lang#10777](rust-lang/rust-clippy#10777)
    <!-- changelog_checked -->
    
    fixes rust-lang#10762
    bors committed May 19, 2023
    Configuration menu
    Copy the full SHA
    2a1dbba View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ab66a86 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    fcf1948 View commit details
    Browse the repository at this point in the history
  5. Update CHANGELOG

    GuillaumeGomez committed May 19, 2023
    Configuration menu
    Copy the full SHA
    5328852 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    dbc76a7 View commit details
    Browse the repository at this point in the history

Commits on May 20, 2023

  1. Auto merge of rust-lang#10763 - GuillaumeGomez:unique_cfg_condition, …

    …r=Jarcho
    
    Add `MINIMAL_CFG_CONDITION` lint
    
    I encountered a few cases where some code had:
    
    ```rust
    #[cfg(any(unix))]
    ```
    
    In this case, the `any` is useless. This lint checks this and also for the `all` condition.
    
    ```
    changelog: [`unique_cfg_condition`]: Add new `UNIQUE_CFG_CONDITION` lint
    ```
    bors committed May 20, 2023
    Configuration menu
    Copy the full SHA
    940ffdf View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#10795 - adrianEffe:fix/TyKind-enum, r=flip1995

    Update URLs in Type Checking chapter
    
    Updated links to `Adt`, `pat_ty` and `Tykind` in the "Type Checking" chapter of the book.
    
    ### Notes:
    - For discussion about the whole project, please use the tracking issue for the project rust-lang#10597  (It also contains a timeline, discussions, and more information).
    
    changelog: Fix broken links in "Type Checking" chapter of the book
    bors committed May 20, 2023
    Configuration menu
    Copy the full SHA
    28dddc7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    96b32b1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2e95a4f View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#10802 - flip1995:rustup, r=flip1995

    Rustup
    
    r? `@ghost`
    
    changelog: none
    bors committed May 20, 2023
    Configuration menu
    Copy the full SHA
    435a8ad View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    12cbb6c View commit details
    Browse the repository at this point in the history
  7. Update Cargo.lock

    flip1995 committed May 20, 2023
    Configuration menu
    Copy the full SHA
    d780efc View commit details
    Browse the repository at this point in the history