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 7 pull requests #91157

Closed
wants to merge 171 commits into from

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. 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
  3. 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
  4. Configuration menu
    Copy the full SHA
    1c8085d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0c4055c View commit details
    Browse the repository at this point in the history
  6. 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. Inhibit clicks on summary's children

    A byproduct of using `<details>` and `<summary>` to show/hide detailed
    documentation was that clicking any part of a method heading (or impl
    heading) would show or hide the documentation. This was not super
    noticeable because clicking a link inside the method heading would
    navigate to that link. But clicking any unlinked black text in a method
    heading would trigger the behavior.
    
    That behavior was somewhat unexpected, and means that if you try to click
    a type name in a method heading, but miss by a few pixels, you get a
    confusing surprise.
    
    This change inhibits that behavior by putting an event listener on most
    summaries that cancels the event unless the event target was the summary
    itself. In practice, that means it cancels the event unless the target
    was the "[+]" / "[-]", because the rest of the heading is wrapped inside
    a `<div>`, which is the target for anything that doesn't have a more
    specific target.
    jsha committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    9aef9a2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e58ffb8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8c1c763 View commit details
    Browse the repository at this point in the history
  5. 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. Configuration menu
    Copy the full SHA
    7f35556 View commit details
    Browse the repository at this point in the history
  3. 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
  4. Configuration menu
    Copy the full SHA
    850e7f5 View commit details
    Browse the repository at this point in the history
  5. Give people a single link they can click in the contributing guide

    Doc Jones mentioned that one of the things making it hard to get started
    is that the amount of information is overwhelming, between the
    dev-guide, contributing guide, and discussion platforms. This gives
    people a single link they can click to ask for help.
    jyn514 committed Nov 22, 2021
    Configuration menu
    Copy the full SHA
    bb7ec7b View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0bc25d0 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1210bb4 View commit details
    Browse the repository at this point in the history
  8. 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
  9. Configuration menu
    Copy the full SHA
    6d61d87 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    6f38568 View commit details
    Browse the repository at this point in the history

Commits on Nov 23, 2021

  1. Configuration menu
    Copy the full SHA
    7b103e7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ec3d1c8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    08a500f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e8e02d9 View commit details
    Browse the repository at this point in the history
  5. 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
  6. Configuration menu
    Copy the full SHA
    5740230 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c46c8c5 View commit details
    Browse the repository at this point in the history
  8. 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
  9. Configuration menu
    Copy the full SHA
    1ee5aa4 View commit details
    Browse the repository at this point in the history
  10. Update Cargo.lock

    flip1995 committed Nov 23, 2021
    Configuration menu
    Copy the full SHA
    b95545b View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#90081 - woppopo:const_write_bytes, r=oli-obk

    Make `intrinsics::write_bytes` const
    
    This is required to constify `MaybeUninit::zeroed` and `(*mut T)::write_bytes`.
    
    Tracking issue: rust-lang#86302
    matthiaskrgr committed Nov 23, 2021
    Configuration menu
    Copy the full SHA
    aa73065 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#91103 - jsha:non-toggle-click-doesnt-toggle…

    …, r=Manishearth,GuillaumeGomez
    
    Inhibit clicks on summary's children
    
    A byproduct of using `<details>` and `<summary>` to show/hide detailed documentation was that clicking any part of a method heading (or impl heading) would show or hide the documentation. This was not super noticeable because clicking a link inside the method heading would navigate to that link. But clicking any unlinked black text in a method heading would trigger the behavior.
    
    That behavior was somewhat unexpected, and means that if you try to click a type name in a method heading, but miss by a few pixels, you get a confusing surprise.
    
    This change inhibits that behavior by putting an event listener on most summaries that cancels the event unless the event target was the summary itself. In practice, that means it cancels the event unless the target was the "[+]" / "[-]", because the rest of the heading is wrapped inside a `<div>`, which is the target for anything that doesn't have a more specific target.
    
    r? `@Manishearth`
    matthiaskrgr committed Nov 23, 2021
    Configuration menu
    Copy the full SHA
    58269a6 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#91137 - jyn514:contributing, r=spastorino

    Give people a single link they can click in the contributing guide
    
    Doc Jones mentioned that one of the things making it hard to get started
    is that the amount of information is overwhelming, between the
    dev-guide, contributing guide, and discussion platforms. This gives
    people a single link they can click to ask for help.
    
    cc `@doc-jones` - is this what you had in mind?
    matthiaskrgr committed Nov 23, 2021
    Configuration menu
    Copy the full SHA
    39542a0 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#91140 - nbdd0121:const_typeck, r=oli-obk

    Split inline const to two feature gates and mark expression position inline const complete
    
    This PR splits inline const in pattern position into its own `#![feature(inline_const_pat)]` feature gate, and make the usage in expression position complete.
    
    I think I have resolved most outstanding issues related to `inline_const` with rust-lang#89561 and other PRs. The only thing left that I am aware of is rust-lang#90150 and the lack of lifetime checks when inline const is used in pattern position (FIXME in rust-lang#89561). Implementation-wise when used in pattern position it has to be lowered during MIR building while in expression position it's evaluated only when monomorphizing (just like normal consts), so it makes some sense to separate it into two feature gates so one can progress without being blocked by another.
    
    `@rustbot` label: T-compiler F-inline_const
    matthiaskrgr committed Nov 23, 2021
    Configuration menu
    Copy the full SHA
    ccc53bb View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#91148 - jhpratt:use-default-enum, r=petroch…

    …enkov
    
    Use `derive_default_enum` in the compiler
    
    Let's get this feature some real-world love.
    
    `@rustbot` label: +C-cleanup +S-waiting-on-review
    matthiaskrgr committed Nov 23, 2021
    Configuration menu
    Copy the full SHA
    80bb3c0 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#91151 - name1e5s:chore/process_test, r=m-ou-se

    Fix test in std::process on android
    
    closes rust-lang#10380
    matthiaskrgr committed Nov 23, 2021
    Configuration menu
    Copy the full SHA
    5c8ed8f View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#91154 - flip1995:clippyup, r=Manishearth

    Update Clippy
    
    r? `@Manishearth`
    
    Delayed Clippy sync. I didn't get to it over the weekend..
    matthiaskrgr committed Nov 23, 2021
    Configuration menu
    Copy the full SHA
    c9ce710 View commit details
    Browse the repository at this point in the history