Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Clippy #84001

Merged
merged 144 commits into from
Apr 8, 2021
Merged

Update Clippy #84001

merged 144 commits into from
Apr 8, 2021

Commits on Mar 25, 2021

  1. Configuration menu
    Copy the full SHA
    9f6b5de View commit details
    Browse the repository at this point in the history
  2. Updated changelog for 1.52

    Co-authored-by: Takayuki Nakata <f.seasons017@gmail.com>
    2 people authored and flip1995 committed Mar 25, 2021
    Configuration menu
    Copy the full SHA
    3a4c0a7 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#6961 - xFrednet:changelog-1-52, r=flip1995

    Update changelog for 1.52
    
    I've underestimated the work that goes into this a bit, but it just shows that a lot has happened again in Clippy in 1.52 🙃.
    
    [Rendered](https://github.com/xFrednet/rust-clippy/blob/changelog-1-52/CHANGELOG.md)
    
    ---
    
    changelog: none
    bors committed Mar 25, 2021
    Configuration menu
    Copy the full SHA
    f41d68f View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2021

  1. Improve redundant_slicing

    Fix bad suggestion when a reborrow might be required
    Fix bad suggestion when the value being sliced is a macro call
    Don't lint inside of a macro due to the previous context sensitive changes
    Jarcho committed Mar 26, 2021
    Configuration menu
    Copy the full SHA
    0ff68bb View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#6975 - Jarcho:redundant_slicing_fp, r=llogiq

    Improve `redundant_slicing`
    
    fixes: rust-lang#6968
    
    changelog: Fix `redundant_slicing` suggestion when a reborrow might be required or when the value is from a macro call
    bors committed Mar 26, 2021
    Configuration menu
    Copy the full SHA
    63aca96 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    caa49c8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f231b59 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    dad39b6 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    494bc8a View commit details
    Browse the repository at this point in the history
  7. Fix inconsistent test names

    Y-Nak committed Mar 26, 2021
    Configuration menu
    Copy the full SHA
    bd1201a View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    818f832 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    1a1adad View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    9ce9989 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    5279b59 View commit details
    Browse the repository at this point in the history
  12. Auto merge of rust-lang#6977 - flip1995:or_patterns_msrv, r=llogiq

    Add MSRV options to `unnested_or_patterns`
    
    changelog: [`unnested_or_patterns`] can now be configured with the `msrv` config/attribute.
    
    Fixes rust-lang#6953
    bors committed Mar 26, 2021
    Configuration menu
    Copy the full SHA
    6f2a6fe View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    5351bbf View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    0dddfbf View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    4e19d40 View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2021

  1. Configuration menu
    Copy the full SHA
    ca7e955 View commit details
    Browse the repository at this point in the history
  2. format macro argument parsing fix

    When the character next to `{}` is "shifted" (when mapping a byte index
    in the format string to span) we should avoid shifting the span end
    index, so first map the index of `}` to span, then bump the span,
    instead of first mapping the next byte index to a span (which causes
    bumping the end span too much).
    
    Regression test added.
    
    Fixes rust-lang#83344
    osa1 committed Mar 27, 2021
    Configuration menu
    Copy the full SHA
    ce4e668 View commit details
    Browse the repository at this point in the history
  3. len_without_is_empty improvements

    Check the return type of `len`. Only integral types, or an `Option` or `Result` wrapping one.
    Ensure the return type of `is_empty` matches. e.g. `Option<usize>` -> `Option<bool>`
    Jarcho committed Mar 27, 2021
    Configuration menu
    Copy the full SHA
    12985af View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#6980 - Jarcho:len_without_is_empty_sig, r=llogiq

    `len_without_is_empty` improvements
    
    fixes: rust-lang#6958
    fixes: rust-lang#6972
    
    changelog: Check the return type of `len`. Only integral types, or an `Option` or `Result` wrapping one.
    changelog: Ensure the return type of `is_empty` matches. e.g. `Option<usize>` -> `Option<bool>`
    bors committed Mar 27, 2021
    Configuration menu
    Copy the full SHA
    dcee00d View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#6979 - flip1995:msrv_doc_fix, r=giraffate

    Add missing lints to MSRV config doc
    
    r? `@giraffate`
    
    changelog: Add missing lints to MSRV config doc
    bors committed Mar 27, 2021
    Configuration menu
    Copy the full SHA
    8e56a2b View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    febf34e View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    7c028de View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    9782fc4 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    c379165 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    add3e50 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#82917 - cuviper:iter-zip, r=m-ou-se

    Add function core::iter::zip
    
    This makes it a little easier to `zip` iterators:
    
    ```rust
    for (x, y) in zip(xs, ys) {}
    // vs.
    for (x, y) in xs.into_iter().zip(ys) {}
    ```
    
    You can `zip(&mut xs, &ys)` for the conventional `iter_mut()` and
    `iter()`, respectively. This can also support arbitrary nesting, where
    it's easier to see the item layout than with arbitrary `zip` chains:
    
    ```rust
    for ((x, y), z) in zip(zip(xs, ys), zs) {}
    for (x, (y, z)) in zip(xs, zip(ys, zs)) {}
    // vs.
    for ((x, y), z) in xs.into_iter().zip(ys).zip(xz) {}
    for (x, (y, z)) in xs.into_iter().zip((ys.into_iter().zip(xz)) {}
    ```
    
    It may also format more nicely, especially when the first iterator is a
    longer chain of methods -- for example:
    
    ```rust
        iter::zip(
            trait_ref.substs.types().skip(1),
            impl_trait_ref.substs.types().skip(1),
        )
        // vs.
        trait_ref
            .substs
            .types()
            .skip(1)
            .zip(impl_trait_ref.substs.types().skip(1))
    ```
    
    This replaces the tuple-pair `IntoIterator` in rust-lang#78204.
    There is prior art for the utility of this in [`itertools::zip`].
    
    [`itertools::zip`]: https://docs.rs/itertools/0.10.0/itertools/fn.zip.html
    Dylan-DPC authored Mar 27, 2021
    Configuration menu
    Copy the full SHA
    b094bb1 View commit details
    Browse the repository at this point in the history
  12. redundant_pattern_matching: look inside Refs

    look inside refs and detect if let &None = ...
    
    Fixes rust-lang/rust-clippy#5396
    
    changelog:  redundant_pattern_matching: look inside Refs to fix FNs with "if let &None = .. "
    matthiaskrgr committed Mar 27, 2021
    Configuration menu
    Copy the full SHA
    e006c77 View commit details
    Browse the repository at this point in the history

Commits on Mar 28, 2021

  1. Remove (lots of) dead code

    Found with https://github.com/est31/warnalyzer.
    
    Dubious changes:
    - Is anyone else using rustc_apfloat? I feel weird completely deleting
      x87 support.
    - Maybe some of the dead code in rustc_data_structures, in case someone
      wants to use it in the future?
    - Don't change rustc_serialize
    
      I plan to scrap most of the json module in the near future (see
      rust-lang/compiler-team#418) and fixing the
      tests needed more work than I expected.
    
    TODO: check if any of the comments on the deleted code should be kept.
    jyn514 committed Mar 28, 2021
    Configuration menu
    Copy the full SHA
    a57a8c3 View commit details
    Browse the repository at this point in the history
  2. Improve expl_impl_clone_on_copy

    Check to see if the generic constraints are the same as if using derive
    Jarcho committed Mar 28, 2021
    Configuration menu
    Copy the full SHA
    879fa5c View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#6991 - matthiaskrgr:5396, r=giraffate

    redundant_pattern_matching: look inside Refs
    
    look inside refs and detect if let &None = ...
    
    Fixes rust-lang/rust-clippy#5396
    
    changelog:  redundant_pattern_matching: look inside Refs to fix FNs with "if let &None = .. "
    bors committed Mar 28, 2021
    Configuration menu
    Copy the full SHA
    4bcc552 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#6993 - Jarcho:expl_impl_clone, r=llogiq

    Improve `expl_impl_clone_on_copy`
    
    fixes: rust-lang#1254
    
    changelog: Check to see if the generic constraints are the same as if using derive for `expl_impl_clone_on_copy`
    bors committed Mar 28, 2021
    Configuration menu
    Copy the full SHA
    c07103b View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2021

  1. Fix inconsistent test name

    Y-Nak committed Mar 29, 2021
    Configuration menu
    Copy the full SHA
    1f95940 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    31afdfc View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#6996 - Y-Nak:missing_panics_doc, r=Manishearth

    Allow missing panics doc if the panics occur only when debug-assertions is specified
    
    fixes rust-lang#6970
    
    changelog: `missing_panics_doc`: Allow missing panics doc if the panics occur only when `debug-assertions` is specified.
    bors committed Mar 29, 2021
    Configuration menu
    Copy the full SHA
    0e06b3c View commit details
    Browse the repository at this point in the history
  4. Improve clone_on_copy

    Lint on `_.clone().method()` when method takes self by value
    Set applicability correctly
    Correct suggestion when the cloned value is a macro call. e.g. `m!(x).clone()`
    Don't lint when not using the `Clone` trait
    Jarcho committed Mar 29, 2021
    Configuration menu
    Copy the full SHA
    d265776 View commit details
    Browse the repository at this point in the history
  5. Use uppercase for MSRV

    giraffate committed Mar 29, 2021
    Configuration menu
    Copy the full SHA
    23508a1 View commit details
    Browse the repository at this point in the history

Commits on Mar 30, 2021

  1. Configuration menu
    Copy the full SHA
    a521445 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    541c8b8 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#6990 - Y-Nak:refactor-functions, r=giraffate

    Organize functions into functions module
    
    Ref: rust-lang#6680
    Rearrange lints in `functions`.
    
    changelog: none
    bors committed Mar 30, 2021
    Configuration menu
    Copy the full SHA
    1ddeaa6 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#7000 - Jarcho:clone_on_copy_fp, r=llogiq

    Improve `clone_on_copy`
    
    This also removes the `clone_on_copy_mut` test as the same thing is covered in the `clone_on_copy` test.
    
    changelog: `copy_on_clone` lint on chained method calls taking self by value
    changelog: `copy_on_clone` only lint when using the `Clone` trait
    changelog: `copy_on_clone` correct suggestion when the cloned value is a macro call.
    bors committed Mar 30, 2021
    Configuration menu
    Copy the full SHA
    0552852 View commit details
    Browse the repository at this point in the history
  5. wrong_self_convention: fix FP inside trait impl for to_* method

    When the `to_*` method takes `&self` and it is a trait implementation,
    we don't trigger the lint.
    mgacek8 committed Mar 30, 2021
    Configuration menu
    Copy the full SHA
    6966c78 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    fa689f8 View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#7004 - Jarcho:manual_map_if_then_else, r=cams…

    …teffen
    
    Fix `manual_map` at the end of an if chain
    
    changelog: Fix `manual_map` suggestion at the end of an if chain
    bors committed Mar 30, 2021
    Configuration menu
    Copy the full SHA
    44bf60f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    cc7f1da View commit details
    Browse the repository at this point in the history
  9. Remove hir::CrateItem.

    cjgillot committed Mar 30, 2021
    Configuration menu
    Copy the full SHA
    d121b34 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    7fcd155 View commit details
    Browse the repository at this point in the history
  11. Auto merge of rust-lang#7001 - ebobrow:non-octal-file-permissions, r=…

    …Manishearth
    
    Add non_octal_unix_permissions lint
    
    fixes rust-lang#6934
    
    changelog: add new lint that checks for non-octal values used to set unix file permissions
    bors committed Mar 30, 2021
    Configuration menu
    Copy the full SHA
    4be72b0 View commit details
    Browse the repository at this point in the history

Commits on Mar 31, 2021

  1. result_unit_err: Fix typo

    Y-Nak committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    45164de View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#7007 - Y-Nak:result_unit_err, r=giraffate

    result_unit_err: Fix typo
    
    changelog: result_unit_err: fix typo in a diagnostic message
    
    r? `@giraffate`
    fixes rust-lang/rust-clippy#6990 (comment).
    bors committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    0b76719 View commit details
    Browse the repository at this point in the history
  3. Fix hidden variant suggestion on single variant

    Michael Wright committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    8abab55 View commit details
    Browse the repository at this point in the history
  4. update lintcheck logs

    matthiaskrgr committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    6ee1469 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    225f7e0 View commit details
    Browse the repository at this point in the history
  6. Track bound vars

    jackh726 committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    b438e30 View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#6938 - Y-Nak:refactor-types, r=flip1995

    Refactor types
    
    r? `@flip1995`
    This is the last PR to close rust-lang#6724 🎉
    Also, this fixes rust-lang#6936.
    
    changelog: `vec_box`: Fix FN in `const` or `static`
    changelog: `linkedlist`: Fix FN in `const` or `static`
    changelog: `option_option`: Fix FN in `const` or `static`
    bors committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    2e33bf6 View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#6981 - matthiaskrgr:6803_take_2, r=flip1995

    disable upper_case_acronyms for pub items - enum edition
    
    Fixes rust-lang/rust-clippy#6803 (again... 😅  )
    
    My previous fix did not work for enums because enum variants were checked separately in the `check_variant` function but it looks like we can't use that because we can't tell if the enum the variants belong to is declared as public or not (it always said `Inherited` for me)
    
    I went and special-cased enums and iterated over all the variants "manually", but only, if the enums is not public.
    
    ---
    
    changelog: fix upper_case_acronyms still firing on public enums (rust-lang#6803)
    bors committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    3e42c35 View commit details
    Browse the repository at this point in the history
  9. New Lint: excessive_for_each

    Y-Nak committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    5029dc8 View commit details
    Browse the repository at this point in the history
  10. Fix codes that fails dogfood

    Y-Nak committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    3095253 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    54a0471 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    5bb0f16 View commit details
    Browse the repository at this point in the history
  13. Avoid to suggest using label

    Y-Nak committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    90cbbb2 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    ccd7a60 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    25d8b94 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    3843171 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    5543c34 View commit details
    Browse the repository at this point in the history
  18. Refactor excessive_for_each

    Y-Nak committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    527fbbe View commit details
    Browse the repository at this point in the history
  19. Remove method_calls

    Y-Nak committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    f2cc995 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    1109dc8 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    bf1e3f7 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    e61f978 View commit details
    Browse the repository at this point in the history
  23. Suggest flatten instead of is_some -> unwrap

    Eric Loren committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    56fbbf7 View commit details
    Browse the repository at this point in the history
  24. Auto merge of rust-lang#6706 - Y-Nak:excessive-for-each, r=camsteffen

    New Lint: needless_for_each
    
    resolves: rust-lang#6543
    
    changelog: Added pedantic lint: `needless_for_each`
    bors committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    c1021b8 View commit details
    Browse the repository at this point in the history
  25. Auto merge of rust-lang#6342 - bbqbaron:issue-6061, r=flip1995

    Lint: filter(Option::is_some).map(Option::unwrap)
    
    Fixes rust-lang#6061
    
    *Please write a short comment explaining your change (or "none" for internal only changes)*
    changelog:
    * add new lint for filter(Option::is_some).map(Option::unwrap)
    
    First Rust PR, so I'm sure I've violated some idioms. Happy to change anything.
    
    I'm getting one test failure locally -- a stderr diff for `compile_test`. I'm having a hard time seeing how I could be causing it, so I'm tentatively opening this in the hopes that it's an artifact of my local setup against `rustc`. Hoping it can at least still be reviewed in the meantime.
    
    I'm gathering that since this is a method lint, and `.filter(...).map(...)` is already checked, the means of implementation needs to be a little different, so I didn't exactly follow the setup boilerplate. My way of checking for method calls seems a little too direct (ie, "is the second element of the expression literally the path for `Option::is_some`?"), but it seems like that's how some other lints work, so I went with it. I'm assuming we're not concerned about, eg, closures that just end up equivalent to `Option::is_some` by eta reduction.
    bors committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    775ef47 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    2108387 View commit details
    Browse the repository at this point in the history
  27. Auto merge of rust-lang#6913 - camsteffen:method-chain, r=flip1995

    Destructure args in `methods`
    
    changelog: none
    
    This changes the main pattern in `methods` to match and destructure the method call args at the same time as the method name, and pass individual arg `Expr`s to the lint impls.
    
    ```rust
    // before
    ["expect", ..] => expect::check(cx, expr, arg_lists[0]);
    // after
    ("expect", [arg]) => expect::check(cx, expr, recv, arg);
    ```
    
    This makes the code safer since there is no risk of out of bounds `args[n]` everywhere. There will be no more collecting `method_names`, `arg_lists`, `method_spans` as a separate step - everything comes out of the `match`es. Chained methods are parsed in a nested `match`. This makes the code more verbose in some ways, but IMO it is much easier to follow.
    
    ~Definitely should wait for rust-lang#6896. Just putting out the idea.~
    bors committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    487c2e8 View commit details
    Browse the repository at this point in the history
  28. Auto merge of rust-lang#7008 - matthiaskrgr:ltchk, r=camsteffen

    lintcheck: warn if we get a bad exit status while running clippy
    
    Right now we won't notice if a crate fails to build.
    Print a warning message to indicate that there is a problem of some sort.
    I'll still have to do more investigation on why this actually happens.
    
    I suspect that the problem is that `clippy fix` might run  --all-targets  but when we download the crate source from crates.io, some path deps (used for internal tests etc...) are not available (which is usually not a problem because the internal tests are not needed when using the crate as a lib..?)
    
    changelog: none
    bors committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    459bca8 View commit details
    Browse the repository at this point in the history
  29. Add if_chain lints

    camsteffen committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    5f887d0 View commit details
    Browse the repository at this point in the history
  30. Eat dogfood

    camsteffen committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    827d6aa View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    aaba9b7 View commit details
    Browse the repository at this point in the history
  32. Auto merge of rust-lang#7010 - camsteffen:if-chain-lint, r=llogiq

    Internal `if_chain!` lints
    
    changelog: none
    
    We use `if_chain!` a lot. So this enforces some style rules around it, internal only.
    
    Lints when...
    * Nested `if`/`if_chain!` can be collapsed
    * An `if_chain!` starts with `let` or ends with `let ..; then {..}`
    * An `if_chain!` has only one `if`
    * An `if_chain!` contains `if .. && ..;` that spans multiple lines
    bors committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    8cf7d9b View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2021

  1. Configuration menu
    Copy the full SHA
    6325fe1 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#6976 - Jarcho:manual_map_const, r=phansch

    Don't lint `manual_map` in const functions
    
    fixes: rust-lang#6967
    
    changelog: Don't lint `manual_map` in const functions
    bors committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    75d73e9 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#7002 - mgacek8:issue6983_wrong_self_conventio…

    …n_inside_trait_impls, r=phansch
    
    wrong_self_convention: fix FP inside trait impl for `to_*` method taking `&self`
    
    fixes rust-lang#6983
    changelog: `wrong_self_convention`: fix FP inside trait impl for `to_*` method taking `&self`
    bors committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    38b1fd0 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#7011 - Jarcho:redundant_clone_fp, r=flip1995

    Fix `redundant_clone` fp
    
    fixes: rust-lang#5973
    fixes: rust-lang#5595
    fixes: rust-lang#6998
    
    changelog: Fix `redundant_clone` fp  where the cloned value is modified while the clone is in use.
    bors committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    92c4fc3 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#7013 - Y-Nak:fix-needless-paren, r=flip1995

    clippy_utils: fix needless parenthesis output from sugg::Sugg::maybe_par
    
    changelog: clippy_utils: fix needless parenthesis output from `sugg::Sugg::maybe_par`
    
    fixes: rust-lang#6767
    bors committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    72eb60a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    08a8ad3 View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2021

  1. Configuration menu
    Copy the full SHA
    9f6f001 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#6988 - mikerite:fix-6984, r=camsteffen

    Fix hidden variant suggestion on single variant
    
    Fixes rust-lang#6984
    
    changelog: Fix hidden variant suggestion on `match_wildcard_for_single_variants`
    bors committed Apr 2, 2021
    Configuration menu
    Copy the full SHA
    1931db2 View commit details
    Browse the repository at this point in the history
  3. Refactor needless_collect

    camsteffen committed Apr 2, 2021
    Configuration menu
    Copy the full SHA
    a064534 View commit details
    Browse the repository at this point in the history
  4. Remove redundant emit()

    camsteffen committed Apr 2, 2021
    Configuration menu
    Copy the full SHA
    4356a8f View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#7016 - camsteffen:bind-map-paths, r=Manishearth

    Remove paths from bind_instead_of_map
    
    changelog: none
    bors committed Apr 2, 2021
    Configuration menu
    Copy the full SHA
    9ce2373 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    33798bb View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#7020 - camsteffen:needless-collect, r=Manishe…

    …arth
    
    Improve needless_collect output
    
    changelog: Improve needless_collect output
    
    Fixes rust-lang#6908
    Partially addresses rust-lang#6164
    bors committed Apr 2, 2021
    Configuration menu
    Copy the full SHA
    86fb0e8 View commit details
    Browse the repository at this point in the history
  8. fix clippy error

    roxelo committed Apr 2, 2021
    Configuration menu
    Copy the full SHA
    2ca5368 View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2021

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

    camsteffen committed Apr 3, 2021
    Configuration menu
    Copy the full SHA
    7014340 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5102c9c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6f31ed6 View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2021

  1. Configuration menu
    Copy the full SHA
    984ab98 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2f81e4e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e25b106 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#7030 - xFrednet:6877-clippy-going-dark, r=llogiq

    Clippy going dark: Adding a dark theme to Clippy's lint list
    
    This PR adds the MdBook color themes to the lint list of Clippy. Well at least an adaption of these themes.
    
    <details>
    <summary>Here are some beautiful screenshots:</summary>
    
    **light theme**
    ![image](https://user-images.githubusercontent.com/17087237/113510593-e31fb280-955b-11eb-8ab1-8b5bcf287475.png)
    
    **Rust theme**
    ![image](https://user-images.githubusercontent.com/17087237/113510734-79ec6f00-955c-11eb-981c-8ebe890acf79.png)
    
    **Coal theme**
    ![image](https://user-images.githubusercontent.com/17087237/113510752-8ec90280-955c-11eb-8f5c-c87ca07c35c2.png)
    
    **Navy theme**
    ![image](https://user-images.githubusercontent.com/17087237/113510675-3f82d200-955c-11eb-8992-8c784abe19ea.png)
    
    **Ayu theme**
    ![image](https://user-images.githubusercontent.com/17087237/113510700-588b8300-955c-11eb-83e0-a8f770e9f913.png)
    
    </details>
    
    The theme is also stored in the browser to ensure that the next session applies the theme and doesn't burn your eyes out.
    
    cc: `@matthiaskrgr`
    
    ---
    
    Closes rust-lang#6877
    
    changelog: [Clippy's lint list](https://rust-lang.github.io/rust-clippy/master/index.html) now supports themes
    bors committed Apr 4, 2021
    Configuration menu
    Copy the full SHA
    6bb608c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    da04e87 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#83820 - petrochenkov:nolinkargs, r=nagisa

    Remove attribute `#[link_args]`
    
    Closes rust-lang#29596
    
    The attribute could always be replaced with `-C link-arg`, but cargo didn't provide a reasonable way to pass such flags to rustc.
    Now cargo supports `cargo:rustc-link-arg*` directives in build scripts (https://doc.rust-lang.org/cargo/reference/unstable.html#extra-link-arg), so this attribute can be removed.
    Dylan-DPC authored Apr 4, 2021
    Configuration menu
    Copy the full SHA
    44e3ccb View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#7021 - camsteffen:7012, r=giraffate

    Fix ICE rust-lang#7012
    
    changelog: none
    
    Fixes rust-lang#7012
    bors committed Apr 4, 2021
    Configuration menu
    Copy the full SHA
    a15d987 View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2021

  1. Fix ICE in missing_panics_doc

    Jarcho committed Apr 5, 2021
    Configuration menu
    Copy the full SHA
    a00de90 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8e5dd4b View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#7031 - xFrednet:5234-quick-fix-dark-mode-them…

    …es, r=llogiq
    
    Quick fix for the updated website theaming to access the correct css files
    
    This fixes a problem from rust-lang#7030 that the service used to access css files was blocked by GitHub pages due to `SSL_ERROR_BAD_CERT_DOMAIN`. The css file loading worked fine during local development. The browser probably disabled some security options due to the local address.
    
    This fix works locally and should also work online as it references the direct css files used by the [mdBook User Guide](https://rust-lang.github.io/mdBook/index.html) the disadvantage of this is that refactorings within the mdBook project can have effects on the theme loading of Clippy. This PR is therefor more meant as a quick fix until I find a better solution.
    
    I've tested these changes using the page editor in the browser and can now confirm that they work :)
    
    changelog: none
    
    r?  `@llogiq`
    bors committed Apr 5, 2021
    Configuration menu
    Copy the full SHA
    e315437 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#7027 - camsteffen:defidmap, r=phansch

    Use DefIdMap and similar aliases
    
    changelog: none
    bors committed Apr 5, 2021
    Configuration menu
    Copy the full SHA
    8d221c5 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#7034 - Jarcho:missing_doc_ice, r=phansch

    Fix ICE in `missing_panics_doc`
    
    fixes: rust-lang#7033
    changelog: Fix ICE in `missing_panics_doc` while searching in a `const` block
    bors committed Apr 5, 2021
    Configuration menu
    Copy the full SHA
    81f9946 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    232e2b7 View commit details
    Browse the repository at this point in the history
  7. A new lint for shared code in if blocks

    * Added expression check for shared_code_in_if_blocks
    * Finishing touches for the shared_code_in_if_blocks lint
    * Applying PR suggestions
    * Update lints yay
    * Moved test into subfolder
    xFrednet committed Apr 5, 2021
    Configuration menu
    Copy the full SHA
    d1df732 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    469ff96 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    8efc6ac View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    b1d26e5 View commit details
    Browse the repository at this point in the history
  11. Updated code for dogfood

    xFrednet committed Apr 5, 2021
    Configuration menu
    Copy the full SHA
    65ed5a6 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    c74e49e View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    617c65b View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    8c0b4d7 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    7c9e192 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    a6f54f5 View commit details
    Browse the repository at this point in the history
  17. Auto merge of rust-lang#7026 - daxpedda:cargo-author, r=camsteffen

    Remove author requirement for `cargo_common_metadata`
    
    This PR follows rust-lang/cargo#9282, I'm not fully informed about all of this, it would be great if somebody knowledgeable about this topic agrees.
    
    changelog: Changed `cargo_common_metadata` to stop linting on the optional author field.
    bors committed Apr 5, 2021
    Configuration menu
    Copy the full SHA
    1a45e43 View commit details
    Browse the repository at this point in the history
  18. Auto merge of rust-lang#6463 - xFrednet:5234-shared-code-in-if-blocks…

    …, r=phansch
    
    New Lint: `branches_sharing_code`
    
    This lint checks if all `if`-blocks contain some statements that are the same and can be moved out of the blocks to prevent code duplication. Here is an example:
    
    ```rust
    let _ = if ... {
        println!("Start"); // <-- Lint for code duplication
        let _a = 99;
        println!("End"); // <-- Lint for code duplication
        false
    } else {
        println!("Start");
        let _b = 17;
        println!("End");
        false
    };
    ```
    
    This could be written as:
    
    ```rust
    println!("Start");
    
    let _ = if ... {
        let _a = 99;
        false
    } else {
        let _b = 17;
        false
    };
    
    println!("End");
    ```
    
    ---
    
    This lint will get masked by the `IF_SAME_THEN_ELSE` lint. I think it makes more sense to only emit one lint per if block. This means that the folloing example:
    
    ```rust
    if ... {
        let _a = 17;
    } else {
        let _a = 17;
    }
    ```
    
    Will only trigger the `IF_SAME_THEN_ELSE` lint and not the `SHARED_CODE_IN_IF_BLOCKS` lint.
    
    ---
    
    closes: rust-lang#5234
    
    changelog: Added a new lint: `branches_sharing_code`
    
    And hello to the one that is writing the changelog for this release :D
    bors committed Apr 5, 2021
    Configuration menu
    Copy the full SHA
    d91da40 View commit details
    Browse the repository at this point in the history
  19. Auto merge of rust-lang#7029 - ABouttefeux:master, r=Manishearth

    fix `missing_panics_doc` not detecting `assert_eq!` and `assert_ne!`
    
    fixes rust-lang#6997
    changelog: `missing_panics_doc` detects `assert_eq!` and `assert_ne!`
    
    ---
    searching for `assert_eq!` and `assert_ne!` in `FindPanicUnwrap`
    bors committed Apr 5, 2021
    Configuration menu
    Copy the full SHA
    25c1ed3 View commit details
    Browse the repository at this point in the history
  20. Auto merge of rust-lang#7018 - Y-Nak:same_item_push, r=Manishearth

    Don't trigger `same_item_push` if the vec is used in the loop body
    
    fixes rust-lang#6987
    changelog: `same_item_push`: Don't trigger if the `vec` is used in the loop body
    bors committed Apr 5, 2021
    Configuration menu
    Copy the full SHA
    57406c9 View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2021

  1. Configuration menu
    Copy the full SHA
    8a50923 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    879bfec View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#7036 - horacimacias:master, r=giraffate

    consider mutability on useless_vec suggestions
    
    fixes rust-lang#7035
    
    changelog: Now the suggested by `useless_vec` considers mutability to suggest either `&[]`, as before, or `&mut []` if the used reference is mutable.
    bors committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    d2ba777 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    12fce55 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#6931 - Jarcho:needless_borrow, r=phansch,flip…

    …1995
    
    Fix all occurences `needless_borrow` internally
    
    The bug that got 'needless_borrow' moved into the nursery was fixed two years ago in d4370f8.
    
    This did trigger over a thousand times internally, so that's all the other changes. I vetted most of them, but there's a lot The only interesting change is to the lint list. `declare_tool_lint` already makes a reference, so there's no need to take a reference to the lints.
    
    changelog: None
    bors committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    6ae0835 View commit details
    Browse the repository at this point in the history
  6. Remove get_node_span

    camsteffen committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    1efb551 View commit details
    Browse the repository at this point in the history
  7. Remove paths::PATH_BUF

    camsteffen committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    79d3082 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    a342de3 View commit details
    Browse the repository at this point in the history
  9. Auto merge of rust-lang#7043 - camsteffen:dead-utils, r=flip1995

    Remove some dead utils
    
    changelog: none
    bors committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    bbe1567 View commit details
    Browse the repository at this point in the history
  10. Auto merge of rust-lang#7044 - camsteffen:match-path, r=Manishearth

    Soft deprecate match_path and match_qpath
    
    changelog: none
    
    From zulip [disucssion](https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/match_.5Bq.5Dpath.20is.20bad.3F).
    bors committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    624e8aa View commit details
    Browse the repository at this point in the history
  11. Symbol optimizations

    camsteffen committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    47f0c15 View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2021

  1. Auto merge of rust-lang#7046 - camsteffen:symbol-optimize, r=giraffate

    Some symbol optimizations
    
    changelog: none
    bors committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    db6ea84 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#83916 - Amanieu:asm_anonconst, r=petrochenkov

    Use AnonConst for asm! constants
    
    This replaces the old system which used explicit promotion. See rust-lang#83169 for more background.
    
    The syntax for `const` operands is still the same as before: `const <expr>`.
    
    Fixes rust-lang#83169
    
    Because the implementation is heavily based on inline consts, we suffer from the same issues:
    - We lose the ability to use expressions derived from generics. See the deleted tests in `src/test/ui/asm/const.rs`.
    - We are hitting the same ICEs as inline consts, for example rust-lang#78174. It is unlikely that we will be able to stabilize this before inline consts are stabilized.
    Dylan-DPC authored Apr 7, 2021
    Configuration menu
    Copy the full SHA
    cde58f7 View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2021

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

    Rustup
    
    changelog: none
    
    r? `@ghost`
    bors committed Apr 8, 2021
    Configuration menu
    Copy the full SHA
    b40ea20 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6b37cd3 View commit details
    Browse the repository at this point in the history