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

Rollup of 9 pull requests #91602

Closed
wants to merge 251 commits into from
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Oct 27, 2021

  1. Clarify platform availability of GetTempPath2

    Windows Server 2022 is a different version from Win11, breaking precent
    talagrand committed Oct 27, 2021
    Configuration menu
    Copy the full SHA
    1d26e41 View commit details
    Browse the repository at this point in the history

Commits on Nov 1, 2021

  1. Fix match_overlapping_arm false negative

    Michael Wright committed Nov 1, 2021
    Configuration menu
    Copy the full SHA
    c3d4577 View commit details
    Browse the repository at this point in the history
  2. Ensure match_overlapping_arms warns on first

    Michael Wright committed Nov 1, 2021
    Configuration menu
    Copy the full SHA
    693df63 View commit details
    Browse the repository at this point in the history

Commits on Nov 4, 2021

  1. Configuration menu
    Copy the full SHA
    1011e08 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d134ddd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a276cd2 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5405152 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#7928 - xFrednet:rust-90354-deploy-clippy-docs…

    …, r=flip1995
    
    Reference `clippy_utils` docs on nightly-rustc and some other documentation updates
    
    The `clippy_utils` crate is now part of the nightly-rustc documentation. See [**very beautiful documentation**](https://doc.rust-lang.org/nightly/nightly-rustc/clippy_utils/). This PR references them in our documentation and updates some other documentation.
    
    changelog: none
    bors committed Nov 4, 2021
    Configuration menu
    Copy the full SHA
    84a4ab7 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    e674d0a View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2021

  1. Configuration menu
    Copy the full SHA
    93ffc9d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    14d54f0 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#7909 - mikerite:fix-7816, r=camsteffen

    Fix false negative in [`match_overlapping_arms`]
    
    changelog: Fix false negative in [`match_overlapping_arms`]
    bors committed Nov 5, 2021
    Configuration menu
    Copy the full SHA
    85e2592 View commit details
    Browse the repository at this point in the history
  4. Edit docs about macros

    camsteffen committed Nov 5, 2021
    Configuration menu
    Copy the full SHA
    5b1b6a2 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#7897 - camsteffen:in-macro, r=flip1995

    Replace `in_macro` usage with `from_expansion`
    
    changelog: none
    
    Generally replace `in_macro(span)` with `span.from_expansion()`. If we're just trying to avoid expanded code, this seems more appropriate because any kind of expanded code is prone to false positives. One place I did not touch is `macro_use.rs`. I think this lint could use a rewrite so I moved `in_macro` there, the only place it is still used.
    bors committed Nov 5, 2021
    Configuration menu
    Copy the full SHA
    9a60a93 View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#7937 - flip1995:rustfmt-skip-artefact, r=Mani…

    …shearth
    
    Remove rustfmt::skip attribute from register_plugins function
    
    r? `@Manishearth` since you added this in rust-lang#540 😄
    
    changelog: none
    bors committed Nov 5, 2021
    Configuration menu
    Copy the full SHA
    445c83f View commit details
    Browse the repository at this point in the history
  7. Remove trim_semicolon

    camsteffen committed Nov 5, 2021
    Configuration menu
    Copy the full SHA
    1c4dd8d View commit details
    Browse the repository at this point in the history
  8. Add expr_visitor util

    camsteffen committed Nov 5, 2021
    Configuration menu
    Copy the full SHA
    73501da View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    5239a90 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    2c7b7e8 View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2021

  1. Extend author lint

    Serial-ATA committed Nov 6, 2021
    Configuration menu
    Copy the full SHA
    c96cd35 View commit details
    Browse the repository at this point in the history
  2. Add cargo dev lint to manually run clippy on a file

    I found the manual run command really useful, this makes it a bit easier
    to type
    Alexendoo committed Nov 6, 2021
    Configuration menu
    Copy the full SHA
    b5bae09 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#7894 - Serial-ATA:extend-author-lint, r=camst…

    …effen
    
    Extend author lint
    
    changelog: none
    
    * Print float and int suffixes
    * Print labels
    * Struct field checks
    * Repeat length expression check
    * Destructure method calls
    * Destructure closures
    bors committed Nov 6, 2021
    Configuration menu
    Copy the full SHA
    e3d1e60 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9a8919d View commit details
    Browse the repository at this point in the history

Commits on Nov 7, 2021

  1. Configuration menu
    Copy the full SHA
    0cb9ac2 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#7917 - Alexendoo:cargo-dev-lint, r=giraffate

    Add `cargo dev lint` to manually run clippy on a file
    
    I found the manual run command really useful, this makes it a bit easier to type
    
    Not sure if this belongs in the changelog or not
    
    changelog: Add `cargo dev lint` to manually run clippy on a file
    bors committed Nov 7, 2021
    Configuration menu
    Copy the full SHA
    07f4f7c View commit details
    Browse the repository at this point in the history
  3. ast: Fix naming conventions in AST structures

    TraitKind -> Trait
    TyAliasKind -> TyAlias
    ImplKind -> Impl
    FnKind -> Fn
    
    All `*Kind`s in AST are supposed to be enums.
    
    Tuple structs are converted to braced structs for the types above, and fields are reordered in syntactic order.
    
    Also, mutable AST visitor now correctly visit spans in defaultness, unsafety, impl polarity and constness.
    petrochenkov committed Nov 7, 2021
    Configuration menu
    Copy the full SHA
    c063203 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2c6f03d View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2021

  1. Don't abort compilation after giving a lint error

    The only reason to use `abort_if_errors` is when the program is so broken that either:
    1. later passes get confused and ICE
    2. any diagnostics from later passes would be noise
    
    This is never the case for lints, because the compiler has to be able to deal with `allow`-ed lints.
    So it can continue to lint and compile even if there are lint errors.
    jyn514 committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    ac9dd36 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#7945 - Serial-ATA:issue-7934, r=flip1995

    Fix ICE in undocumented_unsafe_blocks
    
    changelog: Fix ICE in [`undocumented_unsafe_blocks`]
    
    closes: rust-lang#7934
    bors committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    6fcdf81 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#7938 - camsteffen:visitors, r=xFrednet

    Introduce `expr_visitor` and `expr_visitor_no_bodies`
    
    changelog: none
    
    A couple utils that satisfy a *lot* of visitor use cases. Factoring in every possible usage would be really big so I just focused on cleaning clippy_utils.
    bors committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    94517d3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6d23824 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    413d255 View commit details
    Browse the repository at this point in the history

Commits on Nov 9, 2021

  1. Auto merge of rust-lang#7944 - Serial-ATA:deprecated-cfg-attr-msrv, r…

    …=giraffate
    
    Add MSRV to deprecated_cfg_attr
    
    changelog: Add MSRV to [`deprecated_cfg_attr`]
    
    closes: rust-lang#7922
    bors committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    830f220 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6809234 View commit details
    Browse the repository at this point in the history
  3. Remove unimplemented!() case in matches code

    This unbounded case never actually happens because `all_ranges(..)` uses
    the scrutinee type bounds for open ranges. Switch to our own `Bound`
    enum so that we don't have this case.
    Michael Wright committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    98416d7 View commit details
    Browse the repository at this point in the history
  4. Change Bound to EndBound

    Only the end bounds of ranges can actually be included or excluded. This
    commit changes the SpannedRange type to reflect that. Update `Kind::value`
    to and `Kind::cmp` for this change. `Kind::cmp` gets flipped to check value
    first and then the bound details and is much shorter.
    Michael Wright committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    949b259 View commit details
    Browse the repository at this point in the history
  5. Simplify range comparison code

    Reword the `Kind` type so that the `cmp` function is simpler.
    Michael Wright committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    f829523 View commit details
    Browse the repository at this point in the history
  6. Improve variable naming

    Michael Wright committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    c8f909e View commit details
    Browse the repository at this point in the history
  7. Improve variable naming 2

    Michael Wright committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    81fa758 View commit details
    Browse the repository at this point in the history
  8. matches: remove pub from some items

    There is no reason for these to be `pub`. They aren't used anywhere
    else.
    Michael Wright committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    8b76915 View commit details
    Browse the repository at this point in the history
  9. Auto merge of rust-lang#90485 - camsteffen:fmt-args-less-bind, r=m-ou-se

    Don't destructure args tuple in format_args!
    
    This allows Clippy to parse the HIR more simply since `arg0` is changed to `_args.0`. (cc rust-lang/rust-clippy#7843). From rustc's perspective, I think this is something between a lateral move and a tiny improvement since there are fewer bindings.
    
    r? `@m-ou-se`
    bors committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    6536c58 View commit details
    Browse the repository at this point in the history
  10. Auto merge of rust-lang#87337 - jyn514:lint-error, r=oli-obk,flip1995

    Don't abort compilation after giving a lint error
    
    The only reason to use `abort_if_errors` is when the program is so broken that either:
    1. later passes get confused and ICE
    2. any diagnostics from later passes would be noise
    
    This is never the case for lints, because the compiler has to be able to deal with `allow`-ed lints.
    So it can continue to lint and compile even if there are lint errors.
    
    Closes rust-lang#82761. This is a WIP because I have a feeling it will exit with 0 even if there were lint errors; I don't have a computer that can build rustc locally at the moment.
    bors committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    0332a7b View commit details
    Browse the repository at this point in the history
  11. Auto merge of rust-lang#90700 - fee1-dead:select-returns-vec, r=david…

    …twco
    
    Make `select_*` methods return `Vec` for `TraitEngine`
    
    This reduces some complexity as an empty vec means no errors and non-empty vec means errors occurred.
    bors committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    36d5475 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    e54c341 View commit details
    Browse the repository at this point in the history
  13. Auto merge of rust-lang#7949 - Serial-ATA:issue-7921, r=flip1995

    Fix suggestion for deref expressions in redundant_pattern_matching
    
    changelog: Fix suggestion for deref expressions in [`redundant_pattern_matching`]
    
    closes: rust-lang#7921
    bors committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    c94d62b View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    3382201 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    96db1d6 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    6e84f00 View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#89561 - nbdd0121:const_typeck, r=nikomatsakis

    Type inference for inline consts
    
    Fixes rust-lang#78132
    Fixes rust-lang#78174
    Fixes rust-lang#81857
    Fixes rust-lang#89964
    
    Perform type checking/inference of inline consts in the same context as the outer def, similar to what is currently done to closure.
    
    Doing so would require `closure_base_def_id` of the inline const to return the outer def, and since `closure_base_def_id` can be called on non-local crate (and thus have no HIR available), a new `DefKind` is created for inline consts.
    
    The type of the generated anon const can capture lifetime of outer def, so we couldn't just use the typeck result as the type of the inline const's def. Closure has a similar issue, and it uses extra type params `CK, CS, U` to capture closure kind, input/output signature and upvars. I use a similar approach for inline consts, letting it have an extra type param `R`, and then `typeof(InlineConst<[paremt generics], R>)` would just be `R`. In borrowck region requirements are also propagated to the outer MIR body just like it's currently done for closure.
    
    With this PR, inline consts in expression position are quitely usable now; however the usage in pattern position is still incomplete -- since those does not remain in the MIR borrowck couldn't verify the lifetime there. I have left an ignored test as a FIXME.
    
    Some disucssions can be found on [this Zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/260443-project-const-generics/topic/inline.20consts.20typeck).
    cc `````@spastorino````` `````@lcnr`````
    r? `````@nikomatsakis`````
    
    `````@rustbot````` label A-inference F-inline_const T-compiler
    matthiaskrgr committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    3b6b1ab View commit details
    Browse the repository at this point in the history
  18. Auto merge of rust-lang#7950 - Serial-ATA:issue-7920, r=llogiq

    Fix `explicit_counter_loop` suggestion for non-usize types
    
    changelog: Add a new suggestion for non-usize types in [`explicit_counter_loop`]
    
    closes: rust-lang#7920
    bors committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    f69721f View commit details
    Browse the repository at this point in the history
  19. Auto merge of rust-lang#7951 - mikerite:matches-20211109, r=llogiq

    `match_overlapping_arm` refactoring
    
    The main purpose of this pull request is to remove the unneeded and scary `unimplented!()` in the `match_arm_overlapping` code.
    
    The rest is gratuitous refactoring.
    
    changelog: none
    bors committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    93f13d5 View commit details
    Browse the repository at this point in the history

Commits on Nov 10, 2021

  1. Configuration menu
    Copy the full SHA
    e8861c8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a003ca6 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#7955 - dswij:let-else-early-return, r=giraffate

    Fix `semicolon_if_nothing_returned` FP on `let-else` stmts
    
    closes rust-lang#7912
    
    `semicolon_if_nothing_returned` now additionally checks if the statements ends in `;` , this will also prevent `let-else` statements to be linted.
    
    changelog: fix [`semicolon_if_nothing_returned`] FP  firing on `let-else`
    bors committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    2e17035 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7c1e62d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8565fc4 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    23ed792 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    63cb410 View commit details
    Browse the repository at this point in the history
  8. Added clippy::version attribute to all normal lints

    So, some context for this, well, more a story. I'm not used to scripting, I've never really scripted anything, even if it's a valuable skill. I just never really needed it. Now, `@flip1995` correctly suggested using a script for this in `rust-clippy#7813`...
    
    And I decided to write a script using nushell because why not? This was a mistake... I spend way more time on this than I would like to admit. It has definitely been more than 4 hours. It shouldn't take that long, but me being new to scripting and nushell just wasn't a good mixture... Anyway, here is the script that creates another script which adds the versions. Fun...
    
    Just execute this on the `gh-pages` branch and the resulting `replacer.sh` in `clippy_lints` and it should all work.
    
    ```nu
    mv v0.0.212 rust-1.00.0;
    mv beta rust-1.57.0;
    mv master rust-1.58.0;
    
    let paths = (open ./rust-1.58.0/lints.json | select id id_span | flatten | select id path);
    let versions = (
        ls | where name =~ "rust-" | select name | format {name}/lints.json |
        each { open $it | select id | insert version $it | str substring "5,11" version} |
        group-by id | rotate counter-clockwise id version |
        update version {get version | first 1} | flatten | select id version);
    $paths | each { |row|
        let version = ($versions | where id == ($row.id) | format {version})
        let idu = ($row.id | str upcase)
        $"sed -i '0,/($idu),/{s/pub ($idu),/#[clippy::version = "($version)"]\n    pub ($idu),/}' ($row.path)"
    } | str collect ";" | str find-replace --all '1.00.0' 'pre 1.29.0' | save "replacer.sh";
    ```
    
    And this still has some problems, but at this point I just want to be done -.-
    xFrednet committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    d647696 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    9d9d06d View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    d68408f View commit details
    Browse the repository at this point in the history
  11. Address review feedback

    xFrednet committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    94bc0a1 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    ce01346 View commit details
    Browse the repository at this point in the history
  13. author: fix some bugs

    camsteffen committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    d0cc201 View commit details
    Browse the repository at this point in the history
  14. author: reorder match arm

    camsteffen committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    a806ce7 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    72d7b9c View commit details
    Browse the repository at this point in the history

Commits on Nov 11, 2021

  1. Refactor utils on checking attribute

    Moved out reusable pieces from `is_automatically_derived` and
    `any_parent_is_automatically_derived`.
    dswij committed Nov 11, 2021
    Configuration menu
    Copy the full SHA
    847a95b View commit details
    Browse the repository at this point in the history
  2. Check for no_std and no_core attribute in swap lint

    This commit adds a `no_std` and `no_core` check on `swap` lint and additionally suggest `core::mem::swap` whenever possible.
    Remove warning if both `std` and `core` is not present.
    dswij committed Nov 11, 2021
    Configuration menu
    Copy the full SHA
    2d037aa View commit details
    Browse the repository at this point in the history
  3. Add test for swap lint when no_std is present

    Adds additional test to check for `swap` suggestion when `no_std` is present
    dswij committed Nov 11, 2021
    Configuration menu
    Copy the full SHA
    dcd1a16 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#7877 - dswij:no-std-fp, r=camsteffen

    [`swap`] lints now check if there is `no_std` or `no_core` attribute
    
    Closes rust-lang#7858
    
    changelog: [`swap`] lints now check if there is `no_std` or `no_core` attribute
    bors committed Nov 11, 2021
    Configuration menu
    Copy the full SHA
    8389df9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8c45fd8 View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#7813 - xFrednet:6492-lint-version, r=flip1995

    Add Clippy version to Clippy's lint list
    
    Hey, hey, the semester is finally over, and I wanted to get back into hacking on Clippy. It has also been some time since our metadata collection monster has been feed. So, this PR adds a new attribute `clippy::version` to document which version a lint was stabilized. I considered using `git blame` but that would be very hacky and probably not accurate.
    
    I'm also thinking that this attribute can be used to have a `clippy::nightly` lint group which is allow-by-default that delays setting the actual lint group until the defined version is reached. Just something to consider regarding rust-lang#6623 🙃
    
    This PR only adds the version to 4 lints to keep it reviewable. I'll do a followup PR to add the version to other lints if the implementation is accepted 🙃
    
    ![image](https://user-images.githubusercontent.com/17087237/137118859-0aafdfdf-7595-4289-8ba4-33d58eb6991d.png)
    
    Also, mobile approved xD
    
    ![image](https://user-images.githubusercontent.com/17087237/137118944-833cf7fb-a4a1-45d6-9af8-32c951822360.png)
    
    ---
    
    r? `@flip1995`
    
    cc: rust-lang#7172
    
    closes: rust-lang#6492
    
    changelog: [Clippy's lint list](https://rust-lang.github.io/rust-clippy/master/index.html) now displays the version a lint was added. 🎉
    
    ---
    
    Example lint declaration after this update:
    
    ```rs
    declare_clippy_lint! {
        /// [...]
        ///
        /// ### Example
        /// ```rust
        /// // Bad
        /// let x = 3.14;
        /// // Good
        /// let x = std::f32::consts::PI;
        /// ```
        #[clippy::version = "pre 1.29.0"]
        pub APPROX_CONSTANT,
        correctness,
        "the approximate of a known float constant (in `std::fXX::consts`)"
    }
    ```
    bors committed Nov 11, 2021
    Configuration menu
    Copy the full SHA
    3bfe98d View commit details
    Browse the repository at this point in the history
  7. Make author DRYer

    camsteffen committed Nov 11, 2021
    Configuration menu
    Copy the full SHA
    27a1763 View commit details
    Browse the repository at this point in the history
  8. New index_refutable_slice lint

    * Finding pattern slices for `avoidable_slice_indexing`
    * `avoidable_slice_indexing` analysing slice usage
    * Add configuration to `avoidable_slice_indexing`
    * Emitting `avoidable_slice_indexing` with suggestions
    * Dogfooding and fixing bugs
    * Add ui-toml test for `avoidable_slice_indexing`
    * Correctly suggest `ref` keywords for `avoidable_slice_indexing`
    * Test and document `mut` for `avoid_slice_indexing`
    * Handle macros with `avoidable_slice_indexing` lint
    * Ignore slices with sub patterns in `avoidable_slice_indexing`
    * Update lint description for `avoidable_slice_indexing`
    * Move `avoidable_slice_indexing` to nursery
    * Added more tests for `avoidable_slice_indexing`
    * Update documentation and message for `avoidable_slice_indexing`
    * Teach `avoidable_slice_indexing` about `HirId`s and `Visitors`
    * Rename lint to `index_refutable_slice` and connected config
    xFrednet committed Nov 11, 2021
    Configuration menu
    Copy the full SHA
    e444cbe View commit details
    Browse the repository at this point in the history
  9. Auto merge of rust-lang#7643 - xFrednet:7569-splits-for-slices, r=cam…

    …steffen
    
    New lint `index_refutable_slice` to avoid slice indexing
    
    A new lint to check for slices that could be deconstructed to avoid indexing. This lint should hopefully prevent some panics in other projects and ICEs for us. See rust-lang#7569 for an example
    
    The implementation specifically checks for immutable bindings in `if let` statements to slices and arrays. Then it checks if these bindings are only used for value access using indices and that these indices are lower than the configured limit. I did my best to keep the implementation small, however the check was sadly quite complex. Now it's around 300 lines for the implementation and the rest are test.
    
    ---
    
    Optional future improvements:
    * Check for these instances also in `match` statements
    * Check for mutable slice bindings that could also be destructed
    
    ---
    
    changelog: New lint [`index_refutable_slice`]
    
    I've already fixed a bunch of lint triggers in rust-lang#7638 to make this PR smaller
    
    Closes: rust-lang#7569
    bors committed Nov 11, 2021
    Configuration menu
    Copy the full SHA
    3d4d0cf View commit details
    Browse the repository at this point in the history
  10. Auto merge of rust-lang#7956 - camsteffen:author, r=llogiq

    Author improvements
    
    changelog: none
    
    Various aspects of the author implementation are re-imagined to be much less repetitive. Also fixes some bugs. I hope this makes author more fun to work on for future contributors.
    
    The last commit is pretty heavy but I tried to at least separate some changes so that the test file diffs per commit are simple.
    bors committed Nov 11, 2021
    Configuration menu
    Copy the full SHA
    8b84a76 View commit details
    Browse the repository at this point in the history

Commits on Nov 12, 2021

  1. Configuration menu
    Copy the full SHA
    24d561f View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#7963 - Jarcho:dev_fmt, r=flip1995

    Use rustfmt version from `rust-toolchain`
    
    changelog: None
    bors committed Nov 12, 2021
    Configuration menu
    Copy the full SHA
    610b381 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d4c8cb6 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#7948 - 5225225:castlosslessbool, r=llogiq

    Lint for bool to integer casts in `cast_lossless`
    
    The lint description says
    
    > Checks for casts between *numerical* types that may be replaced by safe conversion functions.
    
    Which is strictly speaking being violated here, but it seems within the spirit of the lint. I think it is still a useful lint to have, and having a different lint for just this feels excessive. Thoughts?
    
    Fixes rust-lang#7947
    
    changelog: Lint for bool to integer casts in [`cast_lossless`]
    bors committed Nov 12, 2021
    Configuration menu
    Copy the full SHA
    4f82dd8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    91fe265 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    608c9e8 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    507030f View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#7966 - Alexendoo:batch-rustfmt, r=camsteffen

    Run rustfmt on batches of multiple files
    
    changelog: none
    
    This gives `cargo dev fmt` a nice speed boost, down from 90s (because old) on my laptop and 120s (because windows) on my desktop to ~5s on both
    
    250 at a time was to give windows a good amount of headroom (failed at ~800, rust-lang#40384)
    
    Also adds rustfmt to the toolchain file and has the clippy_dev workflow test using the pinned version as a follow up to rust-lang#7963
    bors committed Nov 12, 2021
    Configuration menu
    Copy the full SHA
    cc9d7ff View commit details
    Browse the repository at this point in the history

Commits on Nov 13, 2021

  1. Configuration menu
    Copy the full SHA
    80a263d View commit details
    Browse the repository at this point in the history
  2. fix typo

    togami2864 committed Nov 13, 2021
    Configuration menu
    Copy the full SHA
    1df10f0 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#7969 - togami2864:fix-typo, r=xFrednet

    fix typo
    
    just fixed typo
    
    changelog: none
    bors committed Nov 13, 2021
    Configuration menu
    Copy the full SHA
    f51fb34 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2ed4a8a View commit details
    Browse the repository at this point in the history
  5. option_if_let_else: don't expand macros in suggestion

    Fixes rust-lang#7973
    
    changelog: don't expand macros in suggestion of clippy::option_if_let_else
    matthiaskrgr committed Nov 13, 2021
    Configuration menu
    Copy the full SHA
    3fe11e7 View commit details
    Browse the repository at this point in the history

Commits on Nov 14, 2021

  1. Fix specific code outlined in issue rust-lang#7975.

    Still needs to generalize to other mixes of let bindings, `map` method calls, etc.
    Blckbrry-Pi committed Nov 14, 2021
    Configuration menu
    Copy the full SHA
    3e20e30 View commit details
    Browse the repository at this point in the history

Commits on Nov 15, 2021

  1. Support suggestion for rust-lang#7854

    I think the detection of parking_lot's mutex and rwlock is valuable, so submit this pr, please help judge and review, thank you.
    
    Make let_underscore_lock support parking_lot.
    
    changelog: Make let_underscore_lock support parking_lot
    surechen committed Nov 15, 2021
    Configuration menu
    Copy the full SHA
    634e79c View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#7957 - surechen:fix_for_7854, r=giraffate

    Support suggestion for rust-lang#7854
    
    I think the detection of parking_lot's mutex and rwlock is valuable, so submit this pr, please help judge and review, thank you.
    
    Make let_underscore_lock support parking_lot.(Fixes rust-lang#7854)
    
    changelog: Make let_underscore_lock support parking_lot
    bors committed Nov 15, 2021
    Configuration menu
    Copy the full SHA
    f82bf47 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4f71ff3 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#7974 - matthiaskrgr:7973_opt_map_or_else_dont…

    …_expand_sugg_macro, r=flip1995
    
    option_if_let_else: don't expand macros in suggestion
    
    Fixes rust-lang#7973
    
    changelog: don't expand macros in suggestion of clippy::option_if_let_else
    bors committed Nov 15, 2021
    Configuration menu
    Copy the full SHA
    0def42f View commit details
    Browse the repository at this point in the history
  5. add reduce_unit_expression

    togami2864 committed Nov 15, 2021
    Configuration menu
    Copy the full SHA
    bbffe82 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    02e0726 View commit details
    Browse the repository at this point in the history
  7. add comment

    togami2864 committed Nov 15, 2021
    Configuration menu
    Copy the full SHA
    cd57816 View commit details
    Browse the repository at this point in the history
  8. fix fmt

    togami2864 committed Nov 15, 2021
    Configuration menu
    Copy the full SHA
    300282c View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    0a30fdc View commit details
    Browse the repository at this point in the history
  10. Improve needless_borrow lint.

    * Lint when a borrow is auto dereferenced more than once
    * Lint when the expression is used as the expression of a block for a match arm
    
    Moves `needless_borrow` and `ref_binding_to_reference` to `dereference`
    lint pass in preperation for `explicit_auto_deref` lint.
    Jarcho committed Nov 15, 2021
    Configuration menu
    Copy the full SHA
    8ded385 View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2021

  1. Configuration menu
    Copy the full SHA
    2938ffd View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#7639 - Jarcho:whitelist_cheap_functions, r=ca…

    …msteffen
    
    Improve heuristic for eagerness suggestion
    
    Still to be done:
    
    * a more complete list of cheap functions
    * a way to limit the complexity of cheap expressions
    
    changelog: Improve heuristics for `or_fun_call` and `unnecessary_lazy_evaluations`
    bors committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    5b1b65b View commit details
    Browse the repository at this point in the history
  3. resolve CI

    togami2864 committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    7605bac View commit details
    Browse the repository at this point in the history
  4. Successfully generalize prevention of suggestions causing multiple mu…

    …table borrows.
    
    Also add some more tests to check that it's working.
    Blckbrry-Pi committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    5b3c00f View commit details
    Browse the repository at this point in the history
  5. Fix readability suggestions.

    1. Make the lifetime contained in LateContext `'tcx`.
    2. Fix `'txc` to `'tcx` because it was a typo.
    3. Refactor `IterFunctionVisitor`'s `visit_block` method to be more readable.
    4. Replace uses of `rustc_middle::ty::TyKind` with `rustc::middle::ty`, and remove the `#[allow(...)]`.
    
    (Thank you llogiq for all these suggestions!)
    Blckbrry-Pi committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    c52b389 View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#7982 - Blckbrry-Pi:master, r=llogiq

    Fix `needless_collect`'s tendency to suggest code requiring multiple mutable borrows of the same value.
    
    Fixes error specified in rust-lang#7975.
    
    changelog: [`needless_collect`] no longer suggests removal of `collect` when removal would create code requiring mutably borrowing a value multiple times.
    bors committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    83ad511 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e9bf5ec View commit details
    Browse the repository at this point in the history

Commits on Nov 17, 2021

  1. fixes: rust-lang#7889

    1. Fix the problem of manual_split_once changing the original behavior.
    2. Add a new lint needless_splitn.
    
    changelog: Fix the problem of manual_split_once changing the original behavior and add a new lint needless_splitn.
    surechen committed Nov 17, 2021
    Configuration menu
    Copy the full SHA
    c051656 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#7896 - surechen:fix_manual_split_once, r=cams…

    …teffen
    
    Fix for rust-lang#7889 and add new lint needless_splitn
    
    fixes: rust-lang#7889
    1. Fix the problem of manual_split_once changing the original behavior.
    2. Add a new lint needless_splitn.
    
    changelog: Fix the problem of manual_split_once changing the original behavior and add a new lint needless_splitn.
    bors committed Nov 17, 2021
    Configuration menu
    Copy the full SHA
    46687f1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3f3d7c2 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#7898 - F3real:unit_struct, r=camsteffen

    Don't show no_effect warning on unit structs implementing fn_once
    
    Fixes rust-lang#7792
    
    changelog: Don't show [`no_effect`] or [`unecessary_operation`] warning for unit struct implementing FnOnce
    bors committed Nov 17, 2021
    Configuration menu
    Copy the full SHA
    94ca94f View commit details
    Browse the repository at this point in the history
  5. add multi-line test case

    togami2864 committed Nov 17, 2021
    Configuration menu
    Copy the full SHA
    e34927e View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#7988 - giraffate:fix_ice_on_undocumented_unsa…

    …fe_blocks, r=flip1995
    
    Fix ICE on `undocumented_unsafe_blocks`
    
    fix rust-lang/rust-clippy#7979
    
    changelog: Fix ICE on `undocumented_unsafe_blocks`
    bors committed Nov 17, 2021
    Configuration menu
    Copy the full SHA
    d550e5f View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    006c442 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    8506f66 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    5f861ee View commit details
    Browse the repository at this point in the history
  10. fix suggestion message

    togami2864 committed Nov 17, 2021
    Configuration menu
    Copy the full SHA
    8e317f5 View commit details
    Browse the repository at this point in the history
  11. Auto merge of rust-lang#7971 - togami2864:fix/option-map-or-none, r=l…

    …logiq
    
    fix suggestion in option_map_or_none
    
    fix: rust-lang#7960
    changelog: change suggestion in the lint rule `option_map_or_none`
    bors committed Nov 17, 2021
    Configuration menu
    Copy the full SHA
    6ac42fe View commit details
    Browse the repository at this point in the history
  12. Auto merge of rust-lang#7968 - Jarcho:manual_map_unsafe, r=xFrednet

    Fix `manual_map` with unsafe functions
    
    fixes: rust-lang#7820
    changelog: Fix `manual_map` suggestion when used with unsafe functions and unsafe blocks
    bors committed Nov 17, 2021
    Configuration menu
    Copy the full SHA
    bb58dc8 View commit details
    Browse the repository at this point in the history

Commits on Nov 18, 2021

  1. rustc: Remove #[rustc_synthetic]

    This function parameter attribute was introduced in rust-lang#44866 as an intermediate step in implementing `impl Trait`, it's not necessary or used anywhere by itself.
    petrochenkov committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    cb62680 View commit details
    Browse the repository at this point in the history
  2. fix typo

    togami2864 committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    b5a61aa View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#7992 - togami2864:fix-typo, r=giraffate

    fix typo
    
    just fixed typo
    
    changelog: none
    bors committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    8536647 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    731dfde View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    4bccd59 View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#7994 - flip1995:rustup, r=flip1995

    Rustup
    
    r? `@ghost`
    
    changelog: none
    bors committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    8dd1bce View commit details
    Browse the repository at this point in the history
  7. Pluralize disallowed_type lint

    This was brought up in [Zulip] and is also mentioned in the lint naming
    conventions. Since this is still a nursery lint, I think there shouldn't
    be any problem in renaming it.
    
    [Zulip]: https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/disallow_type.20vs.20disallowed-types
    phansch authored and flip1995 committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    b7f1891 View commit details
    Browse the repository at this point in the history
  8. Pluralize disallowed_type lint filenames

    This way they match up with the pluralized lint name as well.
    phansch authored and flip1995 committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    a0d81d1 View commit details
    Browse the repository at this point in the history
  9. Also pluralize disallowed_method(s) lint

    To stay consistent with the sister lint disallowed_type, also rename the
    disallowed_method lint to disallowed_methods.
    flip1995 committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    9b38fb7 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    0375d20 View commit details
    Browse the repository at this point in the history
  11. Auto merge of rust-lang#7977 - Jarcho:multi_needless_borrow, r=xFrednet

    Improve `needless_borrow` lint
    
    fixes: rust-lang#5327
    fixes: rust-lang#1726
    fixes: rust-lang#1212
    
    This is merging `needless_borrow` into the `dereference` pass in preparation for `explicit_auto_deref`. `explicit_auto_deref` needs to implement most of what `needless_borrow` implements in order to work.
    
    There is a minor regression here where `let x: &str = &x.deref()` will trigger `needless_borrow` without triggering `explicit_deref_methods`. Removing the redundant borrow will cause `explicit_deref_methods` to trigger. This will be fixed when `explicit_auto_deref` is implemented.
    
    changelog: Lint `needless_borrow` when a borrow is auto-derefed more than once
    changelog: Lint `needless_borrow` in the trailing expression of a block for a match arm
    bors committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    2776076 View commit details
    Browse the repository at this point in the history

Commits on Nov 19, 2021

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

    togami2864 committed Nov 19, 2021
    Configuration menu
    Copy the full SHA
    cd81bb9 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#7996 - togami2864:test-map-or-none, r=Manishe…

    …arth
    
    Add test case for RESULT_MAP_OR_INTO_OPTION
    
    just added test case for RESULT_MAP_OR_INTO_OPTION.
    changelog: none
    bors committed Nov 19, 2021
    Configuration menu
    Copy the full SHA
    0d283cc View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#7984 - phansch:disallowed-type-rename, r=xFre…

    …dnet
    
    Pluralize `disallowed_type` lint
    
    This was brought up in [Zulip] and is also mentioned in the lint naming
    conventions. Since this is still a nursery lint, I think there shouldn't
    be any problem in renaming it.
    
    [Zulip]: rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/disallow_type.20vs.20disallowed-types
    
    changelog: Rename nursery lint [`disallowed_type`] to [`disallowed_types`].
    bors committed Nov 19, 2021
    Configuration menu
    Copy the full SHA
    38bd251 View commit details
    Browse the repository at this point in the history

Commits on Nov 20, 2021

  1. Configuration menu
    Copy the full SHA
    1429949 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c443f8f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0d1f1ce View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f4c75cd View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5ed93af View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b38f173 View commit details
    Browse the repository at this point in the history
  7. Split tests (too long for CI)

    ThibsG committed Nov 20, 2021
    Configuration menu
    Copy the full SHA
    ddcbac3 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    6dca4f2 View commit details
    Browse the repository at this point in the history
  9. Use applicability for snippets

    ThibsG committed Nov 20, 2021
    Configuration menu
    Copy the full SHA
    e24aba2 View commit details
    Browse the repository at this point in the history
  10. Simplifying next_pos init

    ThibsG committed Nov 20, 2021
    Configuration menu
    Copy the full SHA
    9ab4b67 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    d0dd797 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    97783a8 View commit details
    Browse the repository at this point in the history
  13. Handle other projection kinds

    ThibsG committed Nov 20, 2021
    Configuration menu
    Copy the full SHA
    91dd9c4 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    788c9cc View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    ac45a83 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    6d1ccbf View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    7a55407 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    90a72f5 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    268ef40 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    abaaf74 View commit details
    Browse the repository at this point in the history
  21. Add tests with closure

    ThibsG committed Nov 20, 2021
    Configuration menu
    Copy the full SHA
    7221999 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    2ff702c View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    1176b8e View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    5ebede0 View commit details
    Browse the repository at this point in the history
  25. add test suit

    togami2864 committed Nov 20, 2021
    Configuration menu
    Copy the full SHA
    ec7364f View commit details
    Browse the repository at this point in the history
  26. Add new lint octal_escapes

    This checks for sequences in strings that would be octal character
    escapes in C, but are not supported in Rust.  It suggests either
    to use the `\x00` escape, or an equivalent hex escape if the octal
    was intended.
    birkenfeld committed Nov 20, 2021
    Configuration menu
    Copy the full SHA
    982124a View commit details
    Browse the repository at this point in the history
  27. Auto merge of rust-lang#8000 - Jarcho:nightly_fmt, r=llogiq

    Don't check for a nightly toolchain in fmt test
    
    changelog: None
    bors committed Nov 20, 2021
    Configuration menu
    Copy the full SHA
    827fd50 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    1c8085d View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    092fe20 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    0c4055c View commit details
    Browse the repository at this point in the history
  31. Auto merge of rust-lang#8011 - birkenfeld:double_backticks, r=xFrednet

    Avoid inline hints with double backticks for `doc-markdown`
    
    The easiest route here was to ensure that the suggestion is always shown on
    its own line, where no additional backticks are added by the diagnostic formatter.
    
    Fixes rust-lang#8002
    
    ---
    
    *Please write a short comment explaining your change (or "none" for internal only changes)*
    
    changelog: Avoid inline hints with double backticks for `doc-markdown`
    bors committed Nov 20, 2021
    Configuration menu
    Copy the full SHA
    32048eb View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2021

  1. Fixes rust-lang#7915

    Fix shadow_same's positive false for async function's params:
    
    Example Code:
    ```rust
    #![deny(clippy::shadow_same)]
    
    pub async fn foo(_a: i32) {
    }
    ```
    Output:
    ```
    error: `_a` is shadowed by itself in `_a
    ```
    
    Hir:
    ```rust
    pub async fn foo(_a: i32)
     ->
         /*impl Trait*/ #[lang = "from_generator"](move |mut _task_context|
                                                       {
                                                           let _a = _a;
                                                           { let _t = { }; _t }
                                                       })
    ```
    
    Skip checking async function's params.
    
    changelog: Fix shadow_same's positive false for async function's params
    surechen committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    846c0be View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e58ffb8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8c1c763 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#7997 - surechen:Fixes_7915, r=giraffate

    Fixes shadow_same's false positive for rust-lang#7915
    
    Fix shadow_same's false positive for async function's params(Fixes rust-lang#7915):
    
    Example Code:
    ```rust
    #![deny(clippy::shadow_same)]
    
    pub async fn foo(_a: i32) {
    }
    ```
    Output:
    ```
    error: `_a` is shadowed by itself in `_a
    ```
    
    Hir:
    ```rust
    pub async fn foo(_a: i32)
     ->
         /*impl Trait*/ #[lang = "from_generator"](move |mut _task_context|
                                                       {
                                                           let _a = _a;
                                                           { let _t = { }; _t }
                                                       })
    ```
    
    Skip checking async function's params.
    
    changelog: Fix shadow_same's false positive for async function's params
    bors committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    de2208a View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2021

  1. Auto merge of rust-lang#8009 - xFrednet:8004-suboptimal-flops-in-cons…

    …t, r=giraffate
    
    Allow `suboptimal_flops` in const functions
    
    This PR allows `clippy::suboptimal_flops` in constant functions. The check also effects the `clippy::imprecise_flops` lint logic. However, this doesn't have any effects as all functions checked for are not const and can therefore not be found in such functions.
    
    ---
    
    changelog: [`suboptimal_flops`]: No longer triggers in constant functions
    
    Closes: rust-lang/rust-clippy#8004
    bors committed Nov 22, 2021
    Configuration menu
    Copy the full SHA
    5fbfdfa View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#7989 - couchand:2021-11/toolchain-missing-com…

    …ponents, r=flip1995
    
    Add missing components to rust-toolchain file
    
    Somehow these basic components are missing from the toolchain file...
    
    changelog: none
    bors committed Nov 22, 2021
    Configuration menu
    Copy the full SHA
    4027594 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    850e7f5 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0bc25d0 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1210bb4 View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#8007 - birkenfeld:octal_escapes, r=xFrednet

    Add new lint `octal_escapes`
    
    This checks for sequences in strings that would be octal character
    escapes in C, but are not supported in Rust.  It suggests either
    to use the `\x00` escape, or an equivalent hex escape if the octal
    was intended.
    
    Fixes rust-lang#7981
    
    ---
    
    *Please write a short comment explaining your change (or "none" for internal only changes)*
    
    changelog: Add new lint [`octal_escapes`], which checks for literals like `"\033[0m"`.
    bors committed Nov 22, 2021
    Configuration menu
    Copy the full SHA
    57a8804 View commit details
    Browse the repository at this point in the history

Commits on Nov 23, 2021

  1. Configuration menu
    Copy the full SHA
    ec3d1c8 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#7980 - dswij:7870, r=xFrednet

    Fix FP on `if_then_some_else_none` when there is early return
    
    closes rust-lang#7870
    
    changelog: [`if_then_some_else_none`] now does not fire when there is early return
    bors committed Nov 23, 2021
    Configuration menu
    Copy the full SHA
    d6c707d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5740230 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c46c8c5 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#8025 - flip1995:rustup, r=flip1995

    Rustup
    
    Re-sync, because I didn't get to syncing things back to rustc.
    
    r? `@ghost`
    
    changelog: none
    bors committed Nov 23, 2021
    Configuration menu
    Copy the full SHA
    81f37a8 View commit details
    Browse the repository at this point in the history
  6. Add needless_late_init lint

    Alexendoo committed Nov 23, 2021
    Configuration menu
    Copy the full SHA
    3957244 View commit details
    Browse the repository at this point in the history

Commits on Nov 25, 2021

  1. Configuration menu
    Copy the full SHA
    a135347 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c0bad8b View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#8028 - dswij:8016, r=flip1995

    Add more descriptive help info for `needless_question_mark`
    
    closes rust-lang#8016
    
    changelog: [`needless_question_mark`] help suggestion now explains what should be changed
    bors committed Nov 25, 2021
    Configuration menu
    Copy the full SHA
    35b0f24 View commit details
    Browse the repository at this point in the history
  4. Fix clippy test

    estebank committed Nov 25, 2021
    Configuration menu
    Copy the full SHA
    5fc61a2 View commit details
    Browse the repository at this point in the history
  5. Visit param_env field in Obligation's TypeFoldable impl

    This oversight appears to have gone unnoticed for a long time
    without causing issues, but it should still be fixed.
    Aaron1011 committed Nov 25, 2021
    Configuration menu
    Copy the full SHA
    9274ec5 View commit details
    Browse the repository at this point in the history

Commits on Nov 26, 2021

  1. add test suit

    togami2864 committed Nov 26, 2021
    Configuration menu
    Copy the full SHA
    140ba61 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a745cc5 View commit details
    Browse the repository at this point in the history
  3. fix stderr

    togami2864 committed Nov 26, 2021
    Configuration menu
    Copy the full SHA
    e8ef6ca View commit details
    Browse the repository at this point in the history
  4. fix doc

    togami2864 committed Nov 26, 2021
    Configuration menu
    Copy the full SHA
    e6a6ed4 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#91205 - Aaron1011:visit_param_env, r=lcnr

    Visit `param_env` field in Obligation's `TypeFoldable` impl
    
    This oversight appears to have gone unnoticed for a long time
    without causing issues, but it should still be fixed.
    bors committed Nov 26, 2021
    Configuration menu
    Copy the full SHA
    6b997b6 View commit details
    Browse the repository at this point in the history
  6. fix small nit

    togami2864 committed Nov 26, 2021
    Configuration menu
    Copy the full SHA
    cd8b724 View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#8034 - togami2864:non-ascii-in-sigle-literal,…

    … r=llogiq
    
    Non ascii in sigle literal
    
    fix: rust-lang#8013
    changelog: `non_ascii_literal` warn against non-ASCII within `char`, not just `strings`
    bors committed Nov 26, 2021
    Configuration menu
    Copy the full SHA
    5a6169d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    d346ec9 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    b38a540 View commit details
    Browse the repository at this point in the history

Commits on Nov 27, 2021

  1. Auto merge of rust-lang#7995 - Alexendoo:needless_late_init, r=giraffate

    Add `needless_late_init` lint
    
    examples:
    
    ```rust
    let a;
    a = 1;
    // to
    let a = 1;
    ```
    ```rust
    let b;
    match 3 {
        0 => b = "zero",
        1 => b = "one",
        _ => b = "many",
    }
    // to
    let b = match 3 {
        0 => "zero",
        1 => "one",
        _ => "many",
    };
    ```
    ```rust
    let c;
    if true {
        c = 1;
    } else {
        c = -1;
    }
    // to
    let c = if true {
        1
    } else {
        -1
    };
    ```
    
    changelog: Add [`needless_late_init`]
    bors committed Nov 27, 2021
    Configuration menu
    Copy the full SHA
    3720735 View commit details
    Browse the repository at this point in the history
  2. Only check for errors in predicate when skipping impl assembly

    Prior to PR rust-lang#91205, checking for errors in the overall obligation
    would check checking the `ParamEnv`, due to an incorrect
    `super_visit_with` impl. With this bug fixed, we will now
    bail out of impl candidate assembly if the `ParamEnv` contains
    any error types.
    
    In practice, this appears to be overly conservative - when an error
    occurs early in compilation, we end up giving up early for some
    predicates that we could have successfully evaluated without overflow.
    By only checking for errors in the predicate itself, we avoid causing
    additional spurious 'type annotations needed' errors after a 'real'
    error has already occurred.
    
    With this PR, the diagnostic changes caused by PR rust-lang#91205 are reverted.
    Aaron1011 committed Nov 27, 2021
    Configuration menu
    Copy the full SHA
    3c8b644 View commit details
    Browse the repository at this point in the history
  3. Add Index when checking projs in a call, rename some variables and …

    …remove unneeded statements
    ThibsG committed Nov 27, 2021
    Configuration menu
    Copy the full SHA
    c5ce7ff View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    917fdb1 View commit details
    Browse the repository at this point in the history

Commits on Nov 28, 2021

  1. Configuration menu
    Copy the full SHA
    a8e7fed View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f51bbc7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    56533d9 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#8006 - togami2864:generalize-copied, r=camste…

    …ffen
    
    apply iter_cloned_collect to collect() using copied()
    
    fix: rust-lang#6703
    
    changelog: apply `iter_cloned_collect` to `collect()` using`copied()`
    bors committed Nov 28, 2021
    Configuration menu
    Copy the full SHA
    4e84dd1 View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2021

  1. Auto merge of rust-lang#8001 - Jarcho:unprefixed_strlen, r=giraffate

    Improve `strlen_on_c_string`
    
    fixes: rust-lang#7436
    
    changelog: lint `strlen_on_c_string` when used without a fully-qualified path
    changelog: suggest removing the surrounding unsafe block for `strlen_on_c_string` when possible
    bors committed Nov 29, 2021
    Configuration menu
    Copy the full SHA
    908815c View commit details
    Browse the repository at this point in the history

Commits on Nov 30, 2021

  1. Use new template forms for issue templates

    GitHub has a new way to define issue templates. This gives an even more
    consistent formatting of our issues.
    flip1995 committed Nov 30, 2021
    Configuration menu
    Copy the full SHA
    11002c7 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#8032 - flip1995:new_templates, r=camsteffen

    Use new template forms for issue templates
    
    GitHub has a new way to define issue templates. This gives an even more consistent formatting of our issues.
    
    You can find (read-only) rendered versions [here](https://github.com/flip1995/rust-clippy/tree/new_templates/.github/ISSUE_TEMPLATE). If you want to try to fill out this kind of issue, you can do this in the [`cargo` Repo](https://github.com/rust-lang/cargo/issues/new/choose).
    
    changelog: Better issue templates
    bors committed Nov 30, 2021
    Configuration menu
    Copy the full SHA
    abaffa7 View commit details
    Browse the repository at this point in the history

Commits on Dec 1, 2021

  1. Add test for pattern_type_mismatch.

    This issue has been fixed by [commit](rust-lang/rust-clippy@8c1c763)
    This PR is used for close rust-lang#7946(Fixes rust-lang#7946).
    
    changelog: Add test for pattern_type_mismatch.
    surechen committed Dec 1, 2021
    Configuration menu
    Copy the full SHA
    bd63686 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    522f3f9 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#7993 - homersimpsons:patch-1, r=flip1995

    `no_std_swap`: Fix typo in TODO
    
    changelog: none
    bors committed Dec 1, 2021
    Configuration menu
    Copy the full SHA
    ecf931f View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#8049 - surechen:fixes_7946, r=flip1995

    Add test for pattern_type_mismatch.
    
    This issue has been fixed by [commit](rust-lang/rust-clippy@8c1c763)
    This PR is used for close rust-lang#7946(Fixes rust-lang#7946).
    
    changelog: Add test for pattern_type_mismatch.
    bors committed Dec 1, 2021
    Configuration menu
    Copy the full SHA
    8ad56c8 View commit details
    Browse the repository at this point in the history

Commits on Dec 2, 2021

  1. Configuration menu
    Copy the full SHA
    abddd6c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    782b1a8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ec57cc1 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#8057 - flip1995:rustup, r=flip1995

    Rustup
    
    r? `@ghost`
    
    changelog: none
    bors committed Dec 2, 2021
    Configuration menu
    Copy the full SHA
    392b0c5 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f26821c View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#7463 - ThibsG:find_any_7392, r=xFrednet

    Fix `any()` not taking reference in `search_is_some` lint
    
    `find` gives reference to the item, but `any` does not, so suggestion is broken in some specific cases.
    
    Fixes: rust-lang#7392
    
    changelog: [`search_is_some`] Fix suggestion for `any()` not taking item by reference
    bors committed Dec 2, 2021
    Configuration menu
    Copy the full SHA
    d5d830a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    5cc451b View commit details
    Browse the repository at this point in the history

Commits on Dec 3, 2021

  1. Auto merge of rust-lang#8067 - frobiac:8060-backslash_escaped_in_sing…

    …le_char_pattern, r=giraffate
    
    Escape backslash in single_char_pattern.rs
    
    Escape backslash in single_char_pattern.
    
    Previously, the proposed clippy fix for a single backslash in raw strings ```r"\"``` or ```r#"\"#``` was also only an unescaped, *single* ```'\'```:
    ```shell
    warning: single-character string constant used as pattern
    2 |     let s = r#"abc\xyz/"#.find(r"\");
      |                                ^^^^ help: try using a `char` instead: `'\'`
      |
      = note: `#[warn(clippy::single_char_pattern)]` on by default
    ```
    
    This PR corrects this to a properly escaped *double* backslash ```'\\'```.
    I haven't come up with any other problematic cases, a single quote was already handled.
    
    Closes: rust-lang#8060
    
    changelog:  Escape backslash in ``[`single_char_pattern`]``
    bors committed Dec 3, 2021
    Configuration menu
    Copy the full SHA
    fddef24 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#8061 - vallentin:fix-same-name-method-desc, r…

    …=flip1995
    
    Fixed same_name_method description
    
    Noticed some odd phrasing, while checking out the new release.
    
    changelog: none
    bors committed Dec 3, 2021
    Configuration menu
    Copy the full SHA
    be1a73b View commit details
    Browse the repository at this point in the history
  3. Remove a code path that is neither documented nor can I see the reaso…

    …n it existed.
    
    Also, no tests fail when turning that arm into an ICE
    oli-obk committed Dec 3, 2021
    Configuration menu
    Copy the full SHA
    9e5939a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1c45d1e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    11ad5a2 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    de9de4f View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    17b7478 View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#8040 - xFrednet:6610-known-problems-section-f…

    …or-pre-expansion, r=camsteffen
    
    Updated known problems section for pre-expansion lints about level attributes
    
    Our last three pre-macro expansion lints aren't affected by lint level attributes. This adds a comment to the know problems section of them. I've also updated some CSS to add some spacing after lists on Clippy's lint list:
    
    Before:
    
    ![image](https://user-images.githubusercontent.com/17087237/143783579-064326d4-4e58-4d7d-bbe4-fad8b115fcd4.png)
    
    After:
    
    ![image](https://user-images.githubusercontent.com/17087237/143783650-9803fa03-c332-4e0e-886f-523d4217c6e6.png)
    
    ---
    
    changelog: [`print_stdout`], [`print_stderr`], [`dbg_macro`]: Document how the lint level can be changed and reference rust-lang/rust-clippy#6610
    
    cc: rust-lang/rust-clippy#6610
    bors committed Dec 3, 2021
    Configuration menu
    Copy the full SHA
    3cd151d View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    93564c3 View commit details
    Browse the repository at this point in the history

Commits on Dec 4, 2021

  1. Configuration menu
    Copy the full SHA
    844996b View commit details
    Browse the repository at this point in the history
  2. Add test for evaluate_obligation: Ok(EvaluatedToOkModuloRegions) ICE

    Adds the minimial repro test case from rust-lang#85360. The fix for rust-lang#85360 was
    supposed to be rust-lang#85868 however the repro was resolved in the 2021-07-05
    nightly while rust-lang#85360 didn't land until 2021-09-03. The reason for that
    is d34a3a4 **also** resolves that
    issue.
    
    To test if rust-lang#85868 actually fixes rust-lang#85360, I reverted
    d34a3a4 and found that rust-lang#85868 does
    indeed resolve rust-lang#85360.
    
    With that question resolved, add a test case to our incremental test
    suite for the original Ok(EvaluatedToOkModuloRegions) ICE.
    
    Thanks to @lqd for helping track this down!
    wesleywiser committed Dec 4, 2021
    Configuration menu
    Copy the full SHA
    14c6193 View commit details
    Browse the repository at this point in the history
  3. Add test with #[rustc_evaluate_where_clauses]

    As suggested via reviewer feedback.
    wesleywiser committed Dec 4, 2021
    Configuration menu
    Copy the full SHA
    98e9b32 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6fe13f6 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#8054 - camsteffen:map-flatten-style, r=giraffate

    Upgrade map_flatten to complexity
    
    changelog: upgrade [`map_flatten`] to complexity
    
    Resolves rust-lang#7999
    bors committed Dec 4, 2021
    Configuration menu
    Copy the full SHA
    9eabec9 View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#8074 - Qwaz:send_nonnull, r=xFrednet

    Consider NonNull as a pointer type
    
    PR 1/2 for issue rust-lang#8045. Add `NonNull` as a pointer class to suppress false positives like `UnsafeCell<NonNull<()>>`. However, this change is not sufficient to handle the cases shared in gtk-rs and Rug in the issue.
    
    changelog: none
    
    r? `@xFrednet`
    bors committed Dec 4, 2021
    Configuration menu
    Copy the full SHA
    907f6d9 View commit details
    Browse the repository at this point in the history

Commits on Dec 5, 2021

  1. doc: suggest try_reserve in try_reserve_exact

    Signed-off-by: TennyZhuang <zty0826@gmail.com>
    TennyZhuang committed Dec 5, 2021
    Configuration menu
    Copy the full SHA
    aa3370c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e3c6044 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#8072 - xFrednet:0000-teach-rustbot-acronyms, …

    …r=llogiq
    
    Enable rustbot shortcuts for rust-clippy
    
    This enables shortcuts for ``@rustbot`.` Just a quality of life feature for contributors.
    
    |Shortcut| Full comment |
    |---|---|
    | ``@rustbot` ready` | ``@rustbot` label -S-waiting-on-author +S-waiting-on-review` |
    | ``@rustbot` author` | ``@rustbot` label +S-waiting-on-author -S-waiting-on-review` |
    
    See: https://github.com/rust-lang/triagebot/wiki/Shortcuts
    
    The documentation also states that the author/assignee will be pinged. However, this doesn't seem to be the case, it at least hasn't done so for me and in this [PR](rust-lang#90642 (comment))
    
    ---
    
    changelog: none
    bors committed Dec 5, 2021
    Configuration menu
    Copy the full SHA
    476d609 View commit details
    Browse the repository at this point in the history
  4. Fix dogfood

    nixxquality committed Dec 5, 2021
    Configuration menu
    Copy the full SHA
    01e302b View commit details
    Browse the repository at this point in the history

Commits on Dec 6, 2021

  1. Auto merge of rust-lang#8077 - nixxquality:single_char_pattern-false-…

    …negatives, r=camsteffen
    
    Fix some false negatives for [`single_char_pattern`]
    
    *Please write a short comment explaining your change (or "none" for internal only changes)*
    
    changelog: Fix some false negatives for [`single_char_pattern`]
    
    I noticed that clippy wasn't complaining about my usage of `split_once("x")` in a personal project so I updated the list of functions.
    
    I had to update the test case for an unrelated issue because replace is now included in the list of functions to be linted.
    bors committed Dec 6, 2021
    Configuration menu
    Copy the full SHA
    a5d5976 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f004a1b View commit details
    Browse the repository at this point in the history
  3. Update Cargo.lock

    flip1995 committed Dec 6, 2021
    Configuration menu
    Copy the full SHA
    e36e5a5 View commit details
    Browse the repository at this point in the history
  4. Fix AnonConst ICE

    Add test
    
    Apply suggestions
    
    Switch to match
    
    Apply cargofmt
    terrarier2111 committed Dec 6, 2021
    Configuration menu
    Copy the full SHA
    a0fb992 View commit details
    Browse the repository at this point in the history
  5. update Miri

    RalfJung committed Dec 6, 2021
    Configuration menu
    Copy the full SHA
    a30d60c View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#89999 - talagrand:GetTempPath2, r=m-ou-se

    Update std::env::temp_dir to use GetTempPath2 on Windows when available.
    
    As a security measure, Windows 11 introduces a new temporary directory API, GetTempPath2.
    When the calling process is running as SYSTEM, a separate temporary directory
    will be returned inaccessible to non-SYSTEM processes. For non-SYSTEM processes
    the behavior will be the same as before.
    
    This can help mitigate against attacks such as this one:
    https://medium.com/csis-techblog/cve-2020-1088-yet-another-arbitrary-delete-eop-a00b97d8c3e2
    
    Compatibility risk: Software which relies on temporary files to communicate between SYSTEM and non-SYSTEM
    processes may be affected by this change. In many cases, such patterns may be vulnerable to the very
    attacks the new API was introduced to harden against.
    I'm unclear on the Rust project's tolerance for such change-of-behavior in the standard library. If anything,
    this PR is meant to raise awareness of the issue and hopefully start the conversation.
    
    How tested: Taking the example code from the documentation and running it through psexec (from SysInternals) on
    Win10 and Win11.
    On Win10:
    C:\test>psexec -s C:\test\main.exe
    <...>
    Temporary directory: C:\WINDOWS\TEMP\
    
    On Win11:
    C:\test>psexec -s C:\test\main.exe
    <...>
    Temporary directory: C:\Windows\SystemTemp\
    matthiaskrgr committed Dec 6, 2021
    Configuration menu
    Copy the full SHA
    923f8da View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#91065 - wesleywiser:add_incr_test, r=jackh726

    Add test for evaluate_obligation: Ok(EvaluatedToOkModuloRegions) ICE
    
    Adds the minimial repro test case from rust-lang#85360. The fix for rust-lang#85360 was
    supposed to be rust-lang#85868 however the repro was resolved in the 2021-07-05
    nightly while rust-lang#85868 didn't land until 2021-09-03. The reason for that
    is d34a3a4 **also** resolves that
    issue.
    
    To test if rust-lang#85868 actually fixes rust-lang#85360, I reverted
    d34a3a4 and found that rust-lang#85868 does
    indeed resolve rust-lang#85360.
    
    With that question resolved, add a test case to our incremental test
    suite for the original Ok(EvaluatedToOkModuloRegions) ICE.
    
    Thanks to ``@lqd`` for helping track this down!
    matthiaskrgr committed Dec 6, 2021
    Configuration menu
    Copy the full SHA
    a699859 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#91272 - FabianWolff:issue-90870-const-fn-eq…

    …, r=wesleywiser
    
    Print a suggestion when comparing references to primitive types in `const fn`
    
    Fixes rust-lang#90870.
    matthiaskrgr committed Dec 6, 2021
    Configuration menu
    Copy the full SHA
    62e568b View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#91312 - terrarier2111:anon-const-ice, r=jac…

    …kh726
    
    Fix AnonConst ICE
    
    I am not sure if this is even the correct place to fix this issue, but i went down the path where the generic args came from and i wasn't able to find a clear cause for this down there. But if anybody has a suggestion what i should do, just tell me.
    This fixes: rust-lang#91267
    matthiaskrgr committed Dec 6, 2021
    Configuration menu
    Copy the full SHA
    2309e7d View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#91493 - oli-obk:cleanup, r=michaelwoerister

    Remove a dead code path.
    
    It is neither documented nor can I see any way it could ever be reached.
    
    Also, no tests fail when turning that arm into an ICE
    matthiaskrgr committed Dec 6, 2021
    Configuration menu
    Copy the full SHA
    7e796ff View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#91503 - estebank:call-fn-span, r=michaelwoe…

    …rister
    
    Tweak "call this function" suggestion to have smaller span
    matthiaskrgr committed Dec 6, 2021
    Configuration menu
    Copy the full SHA
    7cd16cf View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#91547 - TennyZhuang:suggest_try_reserve, r=…

    …scottmcm
    
    Suggest try_reserve in try_reserve_exact
    
    During developing rust-lang#91529 , I found that `try_reserve_exact` suggests `reserve` for further insertions. I think it's a mistake by copy&paste, `try_reserve` is better here.
    matthiaskrgr committed Dec 6, 2021
    Configuration menu
    Copy the full SHA
    1c19b91 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#91590 - flip1995:clippyup, r=Manishearth

    Update Clippy
    
    Since RLS is now already broken rust-lang#91543 , we shouldn't be blocked by it anymore. I plan to do the RLS update once new rustc-ap packages are released.
    
    r? `@Manishearth`
    matthiaskrgr committed Dec 6, 2021
    Configuration menu
    Copy the full SHA
    85a1d67 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#91599 - RalfJung:miri, r=RalfJung

    update Miri
    
    Fixes rust-lang#91542
    r? `@ghost`
    matthiaskrgr committed Dec 6, 2021
    Configuration menu
    Copy the full SHA
    9c57fd7 View commit details
    Browse the repository at this point in the history