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

Merged
merged 169 commits into from
Feb 25, 2021
Merged

Update Clippy #82514

merged 169 commits into from
Feb 25, 2021

Commits on Jan 2, 2021

  1. Fix default initialized fields in suggestion

    The default value for a field type does not necessarily match the
    default value for that field in the struct Default.
    camsteffen authored and flip1995 committed Jan 2, 2021
    Configuration menu
    Copy the full SHA
    173e1ba View commit details
    Browse the repository at this point in the history
  2. Remove redundant shadow check

    There is already an assertion that consecutive lines assign to a struct
    field.
    camsteffen authored and flip1995 committed Jan 2, 2021
    Configuration menu
    Copy the full SHA
    f74e200 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fa75f63 View commit details
    Browse the repository at this point in the history

Commits on Jan 3, 2021

  1. Auto merge of rust-lang#6537 - flip1995:beta, r=ebroto

    [beta] Backport of rust-lang#6375 - field_reassign_with_default fix
    
    With the pinned nightly we can test backports to our beta branch now 🎉
    
    cc rust-lang#6515
    
    changelog: beta 1.50: Backport of private fields fix in [`field_reassign_with_default`] lints
    bors committed Jan 3, 2021
    Configuration menu
    Copy the full SHA
    4bd77a1 View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2021

  1. Fix for issue 6640

    pag4k committed Feb 2, 2021
    Configuration menu
    Copy the full SHA
    bfbc083 View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2021

  1. Fixed test

    pag4k committed Feb 3, 2021
    Configuration menu
    Copy the full SHA
    e0e51e4 View commit details
    Browse the repository at this point in the history

Commits on Feb 4, 2021

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

Commits on Feb 7, 2021

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

Commits on Feb 8, 2021

  1. Use id instead of name

    camsteffen committed Feb 8, 2021
    Configuration menu
    Copy the full SHA
    c44eafd View commit details
    Browse the repository at this point in the history
  2. Fix vec_init_then_push FP

    camsteffen committed Feb 8, 2021
    Configuration menu
    Copy the full SHA
    a42be85 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6c73f98 View commit details
    Browse the repository at this point in the history
  4. Simplify if_chain

    camsteffen committed Feb 8, 2021
    Configuration menu
    Copy the full SHA
    1021327 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    39ba449 View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2021

  1. Configuration menu
    Copy the full SHA
    347b01e View commit details
    Browse the repository at this point in the history
  2. use_self - fix issue with hir_ty_to_ty

    tnielens authored and flip1995 committed Feb 10, 2021
    Configuration menu
    Copy the full SHA
    fc334fb View commit details
    Browse the repository at this point in the history
  3. Rewrite use_self lint one more time

    This rewrite gets rid of complicated visitors, by using the lint infrastructure as much as possible
    flip1995 committed Feb 10, 2021
    Configuration menu
    Copy the full SHA
    ae2dd67 View commit details
    Browse the repository at this point in the history
  4. Update test files

    flip1995 committed Feb 10, 2021
    Configuration menu
    Copy the full SHA
    bb40db7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    da65d81 View commit details
    Browse the repository at this point in the history
  6. Fix qpath_res call

    camsteffen authored and flip1995 committed Feb 10, 2021
    Configuration menu
    Copy the full SHA
    7e1c1c1 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    7f61ddd View commit details
    Browse the repository at this point in the history
  8. Use TyS::same_type

    camsteffen authored and flip1995 committed Feb 10, 2021
    Configuration menu
    Copy the full SHA
    52f98d8 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    37f9782 View commit details
    Browse the repository at this point in the history

Commits on Feb 11, 2021

  1. Configuration menu
    Copy the full SHA
    8b9f4a0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    feeed17 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#6720 - flip1995:backport_remerge, r=flip1995

    Backport remerge
    
    changelog: none
    
    r? `@ghost`
    bors committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    8117573 View commit details
    Browse the repository at this point in the history
  4. Update changelog for 1.51

    flip1995 committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    cc82e55 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#6719 - flip1995:changelog, r=xFrednet,flip1995

    Update changelog for 1.51
    
    ~~Don't merge yet. This is the last step of the release process.~~ Release process for 1.50 is done, this can now be merged.
    
    [Rendered](https://github.com/flip1995/rust-clippy/blob/changelog/CHANGELOG.md)
    
    changelog: none
    bors committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    fa2c1d6 View commit details
    Browse the repository at this point in the history

Commits on Feb 12, 2021

  1. Auto merge of rust-lang#6179 - flip1995:rewrite_use_self, r=phansch

    Rework use_self impl based on ty::Ty comparison rust-lang#3410 | Take 2
    
    This builds on top of rust-lang#5531
    
    I already reviewed and approved the commits by `@montrivo.` So only the review of my commits should be necessary.
    
    I would also appreciate your review `@montrivo,` since you are familiar with the challenges here.
    
    Fixes rust-lang#3410 and Fixes rust-lang#4143 (same problem)
    Fixes rust-lang#2843
    Fixes rust-lang#3859
    Fixes rust-lang#4734 and fixes rust-lang#6221
    Fixes rust-lang#4305
    Fixes rust-lang#5078 (even at expression level now 🎉)
    Fixes rust-lang#3881 and Fixes rust-lang#4887 (same problem)
    Fixes rust-lang#3909
    
    Not yet: rust-lang#4140 (test added)
    
    All the credit for the fixes goes to `@montrivo.` I only refactored and copy and pasted his code.
    
    changelog: rewrite [`use_self`] lint and fix multiple (8) FPs. One to go.
    bors committed Feb 12, 2021
    Configuration menu
    Copy the full SHA
    605e9ba View commit details
    Browse the repository at this point in the history
  2. Added boilerplate

    booleancoercion committed Feb 12, 2021
    Configuration menu
    Copy the full SHA
    b80ac2a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6472939 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a389c02 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0b31b47 View commit details
    Browse the repository at this point in the history
  6. Ran bless and rustfmt

    booleancoercion committed Feb 12, 2021
    Configuration menu
    Copy the full SHA
    d1a627a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    9194c11 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    642efab View commit details
    Browse the repository at this point in the history
  9. Auto merge of rust-lang#6700 - daxpedda:panics-doc-unreachable, r=llogiq

    Fix missing_panics_doc warning on `unreachable!`.
    
    Fixes rust-lang#6699.
    
    Are there any other test-cases I should cover?
    
    changelog: [`missing_panics_doc`](https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc): No longer lints on [`unreachable!`](https://doc.rust-lang.org/std/macro.unreachable.html)
    bors committed Feb 12, 2021
    Configuration menu
    Copy the full SHA
    047f3e1 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    d36fe85 View commit details
    Browse the repository at this point in the history
  11. lintcheck: env var LINTCHECK_TOML can be used to override toml file l…

    …ocation (has precedence over --crates-toml flag)
    matthiaskrgr committed Feb 12, 2021
    Configuration menu
    Copy the full SHA
    5bbb1bc View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2021

  1. Configuration menu
    Copy the full SHA
    fedfbb9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8c5d301 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#6738 - xFrednet:0000-update-labels-in-templat…

    …e-files, r=flip1995
    
    Update labels in template files
    
    It seems like we forgot to update the GitHub templates when we decided to update the label names. This PR just adjusts the templates to use the new label names :)
    
    Context: [Zulip discussion about renaming the labels](https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/Label.20cleanup/near/224083870)
    
    ---
    
    changelog: none
    bors committed Feb 13, 2021
    Configuration menu
    Copy the full SHA
    0ce5ecc View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0256103 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#6735 - matthiaskrgr:lintcheck, r=flip1995

    lintcheck: accept env var to set crates.toml file
    
    *Please write a short comment explaining your change (or "none" for internal only changes)*
    changelog: lintcheck: accept  LINTCHECK_TOML env var to set list of crates to be checked.
    bors committed Feb 13, 2021
    Configuration menu
    Copy the full SHA
    51aefbd View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    87109bb View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    dd91987 View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#6736 - Y-Nak:reproducer-for-use_self-ice, r=f…

    …lip1995
    
    Add a minimal reproducer for the ICE in rust-lang#6179
    
    This PR is an auxiliary PR for rust-lang#6179, just add a minimal reproducer for the ICE discussed in rust-lang#6179.
    See rust-lang#6179 for more details.
    
    changelog: none
    bors committed Feb 13, 2021
    Configuration menu
    Copy the full SHA
    5f611ce View commit details
    Browse the repository at this point in the history
  9. Auto merge of rust-lang#81238 - RalfJung:copy-intrinsics, r=m-ou-se

    directly expose copy and copy_nonoverlapping intrinsics
    
    This effectively un-does rust-lang#57997. That should help with `ptr::read` codegen in debug builds (and any other of these low-level functions that bottoms out at `copy`/`copy_nonoverlapping`), where the wrapper function will not get inlined. See the discussion in rust-lang#80290 and rust-lang#81163.
    
    Cc `@bjorn3` `@therealprof`
    bors committed Feb 13, 2021
    Configuration menu
    Copy the full SHA
    ce0a47a View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2021

  1. Auto merge of rust-lang#6697 - camsteffen:vec-init-push-fp, r=flip1995

    Fix vec_init_then_push false positives
    
    changelog: Fix vec_init_then_push false positives
    
    Fixes rust-lang#6615
    bors committed Feb 14, 2021
    Configuration menu
    Copy the full SHA
    eb80ac4 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#6701 - camsteffen:collapsible-if, r=flip1995

    Fix collapsible_if with attributes
    
    changelog: Fix collapsible_if FP with attributes
    
    Fixes rust-lang#6593
    bors committed Feb 14, 2021
    Configuration menu
    Copy the full SHA
    9c3b43e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1202550 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#6741 - ThibsG:BlockInIfConditions1141, r=flip…

    …1995
    
    Do not lint when the closure is called using an iterator
    
    Fix FP when the closure is used in an iterator for `blocks_in_if_conditions` lint
    
    FIxes: rust-lang#1141
    
    changelog: none
    bors committed Feb 14, 2021
    Configuration menu
    Copy the full SHA
    2f19f5f View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2021

  1. Configuration menu
    Copy the full SHA
    93796b2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0198ac7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fb91c76 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5b68fc1 View commit details
    Browse the repository at this point in the history
  5. Only store a LocalDefId in hir::Item.

    Items are guaranteed to be HIR owner.
    cjgillot committed Feb 15, 2021
    Configuration menu
    Copy the full SHA
    2dc6539 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    fc9bc33 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    dbe7609 View commit details
    Browse the repository at this point in the history
  8. Upgrade compiletest-rs to 0.6 and tester to 0.9

    These updates allow us to specify multiple testnames for `TESTNAME`.
    
    The new version of compiletest-rs also includes `bless` support, but is
    not enabled with this PR.
    phansch committed Feb 15, 2021
    Configuration menu
    Copy the full SHA
    7226291 View commit details
    Browse the repository at this point in the history
  9. Auto merge of rust-lang#6743 - rust-lang:update-compiletest, r=Manish…

    …earth
    
    Upgrade compiletest-rs to 0.6 and tester to 0.9
    
    These updates allow us to specify multiple testnames for `TESTNAME` by
    providing a comma separated list of testnames.
    
    The new version of compiletest-rs also includes `bless` support, but is
    not enabled with this PR.
    
    cc rust-lang#5394
    
    changelog: none
    bors committed Feb 15, 2021
    Configuration menu
    Copy the full SHA
    87c682a View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    1b74439 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    4856e5f View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    214d821 View commit details
    Browse the repository at this point in the history
  13. lintcheck: fix bug in downloade_and_extract() for git sources: we nee…

    …d to execute "git checkout xy" inside the repo dir!
    matthiaskrgr committed Feb 15, 2021
    Configuration menu
    Copy the full SHA
    f8dbcae View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    8f1cceb View commit details
    Browse the repository at this point in the history
  15. lintcheck: filter out messages that come from cargo-metadata errors o…

    …r contain absolute paths to rustc source files
    
    The latter is especially annoying because the paths would change every time we bumped the pinned nightly version.
    matthiaskrgr committed Feb 15, 2021
    Configuration menu
    Copy the full SHA
    028692b View commit details
    Browse the repository at this point in the history
  16. lintcheck: update logs

    matthiaskrgr committed Feb 15, 2021
    Configuration menu
    Copy the full SHA
    a95c250 View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2021

  1. Handle struct ctor case

    Y-Nak committed Feb 16, 2021
    Configuration menu
    Copy the full SHA
    1f8ee3c View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#6744 - matthiaskrgr:lintcheck, r=flip1995

    more lintcheck updates
    
    * do some refactoring and renaming here and there
    * add comments to functions
    * fix bug where git repos would not get checked out to the proper commits (cmd was not actually run in repo directory 😅 )
    * print warnings if we can't clone or check out a git repo
    * filter out noise from cargo-metadata errors and lint messages that contained absolute file paths (these would change with every pinned-nightly bump, polluting the logs)
    
    changelog: more lintcheck refactoring and fixes for git crates
    bors committed Feb 16, 2021
    Configuration menu
    Copy the full SHA
    f28c54c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9b0c1eb View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#6662 - Y-Nak:default-numeric-fallback, r=flip…

    …1995
    
    New lint: default_numeric_fallback
    
    fixes rust-lang#6064
    r? `@flip1995`
    
    As we discussed in [here](https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/Issue.20.236064/near/224647188) and [here](https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/Issue.20clippy.236064/near/224746333),   I start implementing this lint from the strictest version.
    In this PR, I'll allow the below two cases to pass the lint to reduce FPs.
    
    1. Appearances of unsuffixed numeric literals in `Local` if `Local` has a type annotation, for example:
    ```rust
    // Good.
    let x: i32 = 1;
    
    // Also good.
    let x: (i32, i32) = if cond {
       (1, 2)
    } else {
       (2, 3)
    };
    ```
    
    2. Appearances of unsuffixed numeric literals in args of `Call` or `MethodCall`  if corresponding arguments of their signature have concrete types, for example:
    ```rust
    fn foo_mono(x: i32) -> i32 {
        x
    }
    
    fn foo_poly<T>(t: T) -> t {
        t
    }
    
    // Good.
    let x = foo_mono(13);
    
    // Still bad.
    let x: i32 = foo_poly(13);
    ```
    
    changelog: Added restriction lint: `default_numeric_fallback`
    bors committed Feb 16, 2021
    Configuration menu
    Copy the full SHA
    e2753f9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2a28ea0 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    dd5c9b7 View commit details
    Browse the repository at this point in the history
  7. Add workspace to manifest

    camsteffen committed Feb 16, 2021
    Configuration menu
    Copy the full SHA
    9bcb257 View commit details
    Browse the repository at this point in the history
  8. Test workspace at once

    camsteffen committed Feb 16, 2021
    Configuration menu
    Copy the full SHA
    e355652 View commit details
    Browse the repository at this point in the history
  9. Auto merge of rust-lang#6749 - camsteffen:test-all, r=Manishearth

    Test workspace at once
    
    changelog: none
    
    Follow-up to rust-lang#6733
    bors committed Feb 16, 2021
    Configuration menu
    Copy the full SHA
    877be18 View commit details
    Browse the repository at this point in the history
  10. Reformat clippy_dev README

    flip1995 committed Feb 16, 2021
    Configuration menu
    Copy the full SHA
    e3f5846 View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2021

  1. Configuration menu
    Copy the full SHA
    79d7f4c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2d60a61 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#6750 - flip1995:lintcheck_options, r=matthias…

    …krgr
    
    Lintcheck and an options for command line options
    
    Make it possible to add command line options to the clippy invocation of the lintcheck-tool
    
    changelog: none
    
    r? `@matthiaskrgr`
    
    I found that this will be really helpful if we use a separate repository and want to maintain a all-lints-passing list of crates. See my early experimentation here: https://github.com/flip1995/clippy-lintcheck
    
    ```
    git submodule update --init
    cargo run -- --mode=all
    ```
    
    Will run the lintcheck tool on all the specified crates in `config/` in that repository.
    bors committed Feb 17, 2021
    Configuration menu
    Copy the full SHA
    ddeea97 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4ac14f9 View commit details
    Browse the repository at this point in the history
  5. Make expr_fallback FnMut

    camsteffen committed Feb 17, 2021
    Configuration menu
    Copy the full SHA
    742922a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9ad6e26 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    6165ccc View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#81993 - flip1995:clippyup, r=Manishearth

    Update Clippy
    
    Biweekly Clippy update
    
    r? `@Manishearth`
    bors committed Feb 17, 2021
    Configuration menu
    Copy the full SHA
    a149f61 View commit details
    Browse the repository at this point in the history

Commits on Feb 18, 2021

  1. Configuration menu
    Copy the full SHA
    a87fa0e View commit details
    Browse the repository at this point in the history
  2. ast: Keep expansion status for out-of-line module items

    Also remove `ast::Mod` which is mostly redundant now
    petrochenkov committed Feb 18, 2021
    Configuration menu
    Copy the full SHA
    b185fa3 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#82215 - TaKO8Ki:replace-if-let-while-let, r…

    …=varkor
    
    Replace if-let and while-let with `if let` and `while let`
    
    This pull request replaces if-let and while-let with `if let` and `while let`.
    
    closes rust-lang#82205
    Dylan-DPC committed Feb 18, 2021
    Configuration menu
    Copy the full SHA
    6e12a2f View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#6759 - Y-Nak:fix-fp-of-result_unit_err, r=llogiq

    Fix FP of result_unit_err when using type aliases
    
    fixes rust-lang#6546
    
    changelog: none
    bors committed Feb 18, 2021
    Configuration menu
    Copy the full SHA
    7d535f6 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    aea55d2 View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#6763 - flip1995:fix_lintcheck, r=matthiaskrgr

    Fix lintcheck by excluding checked crates from workspace
    
    r? `@matthiaskrgr`  cc `@camsteffen`
    
    So `exclude` doesn't work with glob patterns, but it turns out that it works with `starts_with`.
    
    changelog: none
    bors committed Feb 18, 2021
    Configuration menu
    Copy the full SHA
    2f815ec View commit details
    Browse the repository at this point in the history
  7. Changed fn body suggestion msg

    pag4k committed Feb 18, 2021
    Configuration menu
    Copy the full SHA
    a78271b View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#6665 - pag4k:unnecessary_wraps_bug_6640, r=ca…

    …msteffen
    
    Fix for issue 6640
    
    *Please write a short comment explaining your change (or "none" for internal only changes)*
    changelog: unnecessary_wraps will now suggest to remove unnecessary wrapped return unit type, like Option<()>
    fixes rust-lang#6640
    bors committed Feb 18, 2021
    Configuration menu
    Copy the full SHA
    0f70e88 View commit details
    Browse the repository at this point in the history
  9. lintcheck: parallelize

    Use rayon to figure out the threadcount and half that for core count.
    For each core, create a target dir that is used.
    Otherwise, when running multiple clippys with the same target-dir, cargo would lock the dir and prevent parallelism.
    This way we can run multiple clippys at the same time (on root crates) but we sacrifice cache-hits (when we already cargo-checked crate-deps).
    matthiaskrgr committed Feb 18, 2021
    Configuration menu
    Copy the full SHA
    90d3275 View commit details
    Browse the repository at this point in the history

Commits on Feb 19, 2021

  1. Rollup merge of rust-lang#82238 - petrochenkov:nocratemod, r=Aaron1011

    ast: Keep expansion status for out-of-line module items
    
    I.e. whether a module `mod foo;` is already loaded from a file or not.
    This is a pre-requisite to correctly treating inner attributes on such modules (rust-lang#81661).
    
    With this change AST structures for `mod` items diverge even more for AST structure for the crate root, which previously used `ast::Mod`.
    Therefore this PR removes `ast::Mod` from `ast::Crate` in the first commit, these two things are sufficiently different from each other, at least at syntactic level.
    Customization points for visiting a "`mod` item or crate root" were also removed from AST visitors (`fn visit_mod`).
    `ast::Mod` itself was refactored away in the second commit in favor of `ItemKind::Mod(Unsafe, ModKind)`.
    Dylan-DPC committed Feb 19, 2021
    Configuration menu
    Copy the full SHA
    2c302b2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    54c6054 View commit details
    Browse the repository at this point in the history
  3. Change known problems

    camsteffen committed Feb 19, 2021
    Configuration menu
    Copy the full SHA
    46c91db View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1f4153a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    4334f57 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    bf55aee View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c4b8d87 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    bb5f9d1 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    d198551 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    4974734 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    22aeec0 View commit details
    Browse the repository at this point in the history
  12. lintcheck: add -j <N> option to configure threads.

    defaults to 1
    -j 0 choses the number of threads automtically (= number of physical cores)
    matthiaskrgr committed Feb 19, 2021
    Configuration menu
    Copy the full SHA
    8499a32 View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2021

  1. Auto merge of rust-lang#6764 - matthiaskrgr:lintcheck_par_iter, r=fli…

    …p1995
    
    lintcheck: parallelize
    
    By default we use a single thread and one target dir as before.
    
    If `-j n` is passed, use `n` target dirs and run one clippy in each of them.
    We need several target dirs because cargo would lock them for a single process otherwise which would prevent the parallelism.
    `-j 0` makes rayon use  $thread_count/2 (which I assume is the number of physical cores of a machine) for the number of threads.
    
    Other change:
    Show output of clippy being compiled when building it for lintcheck (makes it easier to spot compiler errors etc)
    Show some progress indication in the "Linting... foo 1.2.3"  message.
    Sort crates before linting (previously crates would be split randomly between target dirs, with the sorting, we try to make sure that even crates land in target dir 0 and odd ones in target dir 1 etc..)
    
    *Please write a short comment explaining your change (or "none" for internal only changes)*
    changelog: parallelize lintcheck with rayon
    bors committed Feb 20, 2021
    Configuration menu
    Copy the full SHA
    23de801 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#6766 - matthiaskrgr:nestedmatch, r=flip1995

    collapsible_match: fix lint message capitalization
    
    (see https://rustc-dev-guide.rust-lang.org/diagnostics.html for details)
    
    ---
    
    *Please write a short comment explaining your change (or "none" for internal only changes)*
    changelog: collapsible_match: fix lint message capitalization
    bors committed Feb 20, 2021
    Configuration menu
    Copy the full SHA
    2746632 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#6717 - booleancoercion:master, r=llogiq

    Add the from_str_radix_10 lint
    
    changelog: added the new `from_str_radix_10` which sometimes replaces calls to `primitive::from_str_radix` to `str::parse`
    
    This is ready to be merged, although maybe the category should be `pedantic` instead of `style`? I'm not sure where it fits better.
    
    Closes rust-lang#6713.
    bors committed Feb 20, 2021
    Configuration menu
    Copy the full SHA
    67087a1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5af6f96 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d230389 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d646aa2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    19a3775 View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2021

  1. Auto merge of rust-lang#6754 - camsteffen:spanlesseq-res, r=flip1995

    Teach SpanlessEq binding IDs
    
    changelog: Fix collapsible_match false positive
    
    Fixes rust-lang#6740
    
    This PR changes the way `SpanlessEq` determines whether two local variables are the same. Instead of checking that the names match, it checks that the `HirId`s match. If local bindings are declared within the expressions that are being compared, `SpanlessEq` will remember bindings that correspond to each other in a `FxHashMap<HirId, HirId>`. This makes `SpanlessEq` more flexible while also fixing false positives.
    
    Example: `{ let x = 1; x + 2 }` is equal to `{ let y = 1; y + 2 }`.
    
    CC `@xFrednet` I think this will resolve some concerns in rust-lang#6463
    bors committed Feb 21, 2021
    Configuration menu
    Copy the full SHA
    d2ddf9c View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#6765 - camsteffen:unnecessary-wraps-pedantic,…

    … r=flip1995
    
    Change unnecessary_wraps to pedantic
    
    changelog: Change unnecessary_wraps to pedantic
    
    There seems to be enough evidence that this lint is not wanted as warn-by-default. Attempted before at rust-lang#6380. False positives at rust-lang#6721 and rust-lang#6427. Actually requested to change the category at rust-lang#6726.
    
    Closes rust-lang#6726
    bors committed Feb 21, 2021
    Configuration menu
    Copy the full SHA
    8a47901 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#6770 - ThibsG:PostfixEnumVariant, r=flip1995

    Fix camel case postfix for `enum_variant_names` lint
    
    Fix camel case postfix
    
    Fixes: rust-lang#4639
    
    changelog: none
    bors committed Feb 21, 2021
    Configuration menu
    Copy the full SHA
    208e957 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#6771 - MortenLohne:master, r=flip1995

    Fix FP in inherent_to_string when the function has generic parameters
    
    Minimal example of the false positive:
    ````
    struct G;
    
    impl G {
        fn to_string<const _N: usize>(&self) -> String {
            "G.to_string()".to_string()
        }
    }
    
    fn main() {
        let g = G;
        g.to_string::<1>();
    }
    ````
    Clippy emits an `inherent_to_string` warning, and suggests that we implement `Display` for `G` instead. However, this is not possible, since the generic parameter _N only exists in this function, not in `G` itself. This particular example uses const generics, which is where the issue is most likely to come up, but this PR skips the lint if the `to_string` function has any kind of generic parameters.
    
    changelog: Fix FP in `inherent_to_string`
    bors committed Feb 21, 2021
    Configuration menu
    Copy the full SHA
    728f397 View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2021

  1. Configuration menu
    Copy the full SHA
    bfdf0fa View commit details
    Browse the repository at this point in the history
  2. Add: option_manual_map lint

    Jarcho committed Feb 22, 2021
    Configuration menu
    Copy the full SHA
    efe33f9 View commit details
    Browse the repository at this point in the history
  3. Quick fix cargo dev bless

    Y-Nak committed Feb 22, 2021
    Configuration menu
    Copy the full SHA
    5fe3b6c View commit details
    Browse the repository at this point in the history
  4. Fix dogfood errors

    Jarcho committed Feb 22, 2021
    Configuration menu
    Copy the full SHA
    23aa2f8 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#6769 - Y-Nak:inconsistent-struct-constructor,…

    … r=matthiaskrgr
    
    Inconsistent struct constructor
    
    fixes: rust-lang#6352
    r? `@matthiaskrgr`
    
    I added the lint that checks for the struct constructors where the order of the field init shorthands is inconsistent with that in the struct definition.
    
    changelog: Add style lint: `inconsistent_struct_constructor`
    bors committed Feb 22, 2021
    Configuration menu
    Copy the full SHA
    fe01ddc View commit details
    Browse the repository at this point in the history
  6. upper_case_acronyms: move lint from style to pedantic lint group

    The lint does point out inconsistency with the Rust naming convention,
    but the fact that rustc does not warn about the inconsistency by default
    means that clippy probably should not warn by default either.
    
    changelog: move upper_case_acronyms lint from style to pedantic group.
    matthiaskrgr committed Feb 22, 2021
    Configuration menu
    Copy the full SHA
    0eefa61 View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#6775 - matthiaskrgr:upper_case_pedantic, r=fl…

    …ip1995
    
    upper_case_acronyms: move lint from style to pedantic lint group
    
    The lint does point out inconsistency with the Rust naming convention,
    but the fact that rustc does not warn about the inconsistency by default
    means that clippy probably should not warn by default either.
    
    changelog: move upper_case_acronyms lint from style to pedantic group.
    bors committed Feb 22, 2021
    Configuration menu
    Copy the full SHA
    697f3b6 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    e05965e View commit details
    Browse the repository at this point in the history

Commits on Feb 23, 2021

  1. Auto merge of rust-lang#6774 - Y-Nak:quick-fix-bless, r=phansch

    Quick fix cargo dev bless
    
    fixes rust-lang#6757
    r? `@phansch`
    
    Trying to do a quick fix of `bless`, I'm not sure how much work it will need to do transition to `bless` built in `compiletest`, so please feel free to close this PR if it will not need so much.
    
    changelog: none
    bors committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    a3127fa View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#6777 - giraffate:remove_unneeded_blank_lines_…

    …from_doc, r=phansch
    
    Remove unneeded blank lines from doc
    
    Remove unneeded blank lines like below.
    <img width="1142" alt="スクリーンショット 2021-02-22 23 01 17" src="https://user-images.githubusercontent.com/17407489/108719295-bb9ff800-7562-11eb-9338-8f2571e61c56.png">
    
    changelog: none
    bors committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    0984754 View commit details
    Browse the repository at this point in the history
  3. lintcheck: rerun if clippy changed

    Automatically clean lintchecks shared target dir (will force clippy to recheck sources) if
    the clippy binaries are older than the lintcheck logs.
    
    Also update lintcheck logs
    matthiaskrgr committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    363f6d3 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#6780 - matthiaskrgr:lintcheck2, r=flip1995

    lintcheck: fully rerun lintcheck if clippy was rebuilt since last log update
    
    Automatically clean lintchecks shared target dir (will force clippy to recheck sources) if
    the clippy binaries are older than the lintcheck logs.
    
    Also updated lintcheck logs in the pr.
    
    changelog: lintcheck: fully rerun lintcheck if clippy was rebuilt since last log update
    bors committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    f02df27 View commit details
    Browse the repository at this point in the history
  5. lintcheck fix build (forgot to pass function parameter) and runtime (…

    …don't check metadata of directory if it does not exist)
    matthiaskrgr committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    eaae95b View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#6781 - matthiaskrgr:lintcheck_fix, r=matthias…

    …krgr
    
    lintcheck fix build (forgot to pass function parameter) and runtime (…
    
    …don't check metadata of directory if it does not exist)
    
    Accidentally broke lintcheck in my previous commit.
    
    changelog: None
    bors committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    a5c5c8f View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#6573 - Jarcho:option_match_map, r=llogiq

    New lint: option_manual_map
    
    fixes: rust-lang#6
    changelog: Added lint: `match_map`
    bors committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    a2c25fa View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    09bded4 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    8d2de8f View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    c5b9d22 View commit details
    Browse the repository at this point in the history
  11. Get tests to pass

    smoelius committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    523de29 View commit details
    Browse the repository at this point in the history
  12. Remove unused dependencies

    smoelius committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    29b6570 View commit details
    Browse the repository at this point in the history
  13. Remove unused features

    smoelius committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    b7f03c6 View commit details
    Browse the repository at this point in the history
  14. Improve tests

    smoelius committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    ff157ae View commit details
    Browse the repository at this point in the history
  15. Fix one import

    smoelius committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    5f04b50 View commit details
    Browse the repository at this point in the history
  16. Fix versioncheck test

    smoelius committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    1e7b1cc View commit details
    Browse the repository at this point in the history
  17. Bump clippy_utils version

    smoelius committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    964f2a0 View commit details
    Browse the repository at this point in the history
  18. Fix doc test

    smoelius committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    979206f View commit details
    Browse the repository at this point in the history
  19. Fix update_lints

    smoelius committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    ce76fb3 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    2c26c0f View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    50e3ef9 View commit details
    Browse the repository at this point in the history
  22. Typo

    smoelius committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    8500ad5 View commit details
    Browse the repository at this point in the history
  23. Update clippy_utils/Cargo.toml

    Co-authored-by: Philipp Krones <hello@philkrones.com>
    smoelius and flip1995 committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    33ee598 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    c7869b8 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    ab7381f View commit details
    Browse the repository at this point in the history

Commits on Feb 24, 2021

  1. README: Add subsection on running Clippy as a rustc wrapper

    This is useful for projects that do not use cargo.
    
    Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
    ojeda committed Feb 24, 2021
    Configuration menu
    Copy the full SHA
    6b8b43c View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#6782 - ojeda:readme-as-wrapper, r=flip1995

    README: Add subsection on running Clippy as a rustc wrapper
    
    This is useful for projects that do not use cargo.
    
    changelog: README: Add subsection on running Clippy as a rustc wrapper
    bors committed Feb 24, 2021
    Configuration menu
    Copy the full SHA
    045d3f3 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#6756 - smoelius:clippy_utils, r=flip1995,obi-obk

    Factor out `clippy_utils` crate
    
    As discussed in rust-lang/rust-clippy#6746, this PR factors out `clippy_lints::utils` as its own crate, `clippy_utils` .
    
    This change will allow `clippy_utils` to be used in lints outside of Clippy.
    
    There is no plan to publish this crate on `crates.io` (see rust-lang/rust-clippy#6746 (comment)). Dependent crates should obtain it from GitHub.
    
    changelog: Factor out `clippy_utils` so it can be used by external tools (not published)
    bors committed Feb 24, 2021
    Configuration menu
    Copy the full SHA
    489c4f0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8047458 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#6786 - smoelius:move-conf-rs-back-into-clippy…

    …-lints, r=flip1995
    
    Move conf.rs back into clippy_lints
    
    This is an alternative solution to rust-lang#6785 to fix the CI break caused by rust-lang#6756.
    
    changelog: none
    bors committed Feb 24, 2021
    Configuration menu
    Copy the full SHA
    4545150 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    72e3335 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b0d18e9 View commit details
    Browse the repository at this point in the history
  8. upper_case_acronyms: add optional aggressive mode and relax default

    Moves the lint back from pedantic to style group.
    The lint default now only warns on names that are completely capitalized, like "WORD"
    and only if the name is longer than 2 chars (so that names where each of the letter represents a word are still distinguishable).
    For example: FP (false positive) would still be "valid" and not warned about (but EOF would warn).
    
    A "upper_case_acronyms_aggressive: true/false" config option was added that restores the original lint behaviour to warn
    on any kind of camel case name that had more than one capital letter following another capital letter.
    matthiaskrgr committed Feb 24, 2021
    Configuration menu
    Copy the full SHA
    59750dc View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    913c710 View commit details
    Browse the repository at this point in the history

Commits on Feb 25, 2021

  1. Auto merge of rust-lang#6783 - avitex:add-opendns-ident, r=giraffate

    Add OpenDNS to `doc-valid-idents`
    
    changelog: This commit adds `"OpenDNS"` to doc-valid-idents to avoid `doc_markdown` false positives.
    bors committed Feb 25, 2021
    Configuration menu
    Copy the full SHA
    76a689d View commit details
    Browse the repository at this point in the history
  2. run cargo dev update_lints

    fix sentence / address review comments
    matthiaskrgr committed Feb 25, 2021
    Configuration menu
    Copy the full SHA
    2a6b061 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#6788 - matthiaskrgr:upper_case_acronyms, r=fl…

    …ip1995
    
    move upper_case_acronyms back to style, but make the default behaviour less aggressive by default (can be unleashed via config option)
    
    Previous discussion in the bi-weekly clippy meeting for reference: https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/Meeting.202021-02-23/near/227458019
    
    Move the `upper_case_acronyms` lint back to the style group.
    Only warn on fully-capitalized names by default.
    Add add a clippy-config option `upper-case-acronyms-aggressive: true/false` to enabled more aggressive linting on
    all substrings that could be capitalized acronyms.
    
    ---
    changelog: reenable upper_case_acronyms by default but make the more aggressive linting opt-in via config option
    bors committed Feb 25, 2021
    Configuration menu
    Copy the full SHA
    ef41f2b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c6408a4 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8f8c7c2 View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#6789 - flip1995:rustup, r=flip1995

    Rustup
    
    r? `@ghost`
    
    changelog: None
    bors committed Feb 25, 2021
    Configuration menu
    Copy the full SHA
    928e72d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    81af346 View commit details
    Browse the repository at this point in the history
  8. Fix Clippy build and test

    flip1995 committed Feb 25, 2021
    Configuration menu
    Copy the full SHA
    a6dd9b9 View commit details
    Browse the repository at this point in the history
  9. Update Cargo.lock

    flip1995 committed Feb 25, 2021
    Configuration menu
    Copy the full SHA
    0046d7c View commit details
    Browse the repository at this point in the history