Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Rollup of 11 pull requests #82201

Closed
wants to merge 141 commits into from

Commits on Dec 12, 2020

  1. Add 'consider using' message to overflowing_literals

    Ironically, the overflowing_literals handler for binary or hex already
    had this message! You would think it would be the other way around :)
    camelid committed Dec 12, 2020
    Configuration menu
    Copy the full SHA
    d00ca11 View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2021

  1. Configuration menu
    Copy the full SHA
    949b125 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5753614 View commit details
    Browse the repository at this point in the history
  3. Rename lint

    nahuakang committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    3da25ed View commit details
    Browse the repository at this point in the history
  4. Run cargo dev update_lints

    nahuakang committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    8973f2c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b87e189 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7825bf3 View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2021

  1. Enhance manual flatten

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

Commits on Feb 3, 2021

  1. Configuration menu
    Copy the full SHA
    c8cb90a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0f5e71f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f2e82af View commit details
    Browse the repository at this point in the history
  4. Fix file names of flat_map_identity test

    This commit fixes the file names of the `flat_map_identity` test.
    Previously, their names were started with `unnecessary_flat_map` even
    though the lint rule name is `flat_map_identity`. This inconsistency
    happened probably because the rule name was changed during the
    discussion in the PR where this rule was introduced.
    
    ref: rust-lang/rust-clippy#4231
    magurotuna committed Feb 3, 2021
    Configuration menu
    Copy the full SHA
    6396b8f View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#6669 - magurotuna:fix-test-name, r=flip1995

    Fix file names of flat_map_identity test
    
    This patch fixes the file names of the `flat_map_identity` test.
    Previously, their names were started with `unnecessary_flat_map` even though the lint rule name is `flat_map_identity`. This inconsistency happened probably because the rule name was changed during the discussion in the PR where this rule was introduced.
    
    ref: rust-lang/rust-clippy#4231
    
    changelog: none
    bors committed Feb 3, 2021
    Configuration menu
    Copy the full SHA
    876ffa4 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    78ef0f2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    0767a0f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    9f7f8b7 View commit details
    Browse the repository at this point in the history

Commits on Feb 4, 2021

  1. Configuration menu
    Copy the full SHA
    2f8a8d3 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#6646 - nahuakang:for_loops_over_options_or_re…

    …sults, r=flip1995
    
    New Lint: Manual Flatten
    
    This is a draft PR for [Issue 6564](rust-lang/rust-clippy#6564).
    
    r? `@camsteffen`
    
    - \[x] Followed [lint naming conventions][lint_naming]
    - \[x] Added passing UI tests (including committed `.stderr` file)
    - \[x] `cargo test` passes locally
    - \[x] Executed `cargo dev update_lints`
    - \[x] Added lint documentation
    - \[x] Run `cargo dev fmt`
    
    ---
    
    *Please write a short comment explaining your change (or "none" for internal only changes)*
    changelog: Add new lint [`manual_flatten`] to check for loops over a single `if let` expression with `Result` or `Option`.
    bors committed Feb 4, 2021
    Configuration menu
    Copy the full SHA
    357c6a7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    233fe11 View commit details
    Browse the repository at this point in the history
  4. Support free functions in disallowed-methods lint

    In other words, support:
    
    `disallowed_methods = ["alloc::vec::Vec::new"]` (a free function) in
    addition to
    `disallowed_methods = ["alloc::vec::Vec::leak"]` (a method).
    
    Improve the documentation to clarify that users must specify the full
    qualified path for each disallowed function, which can be confusing for
    reexports. Include an example `clippy.toml`.
    
    Simplify the actual lint pass so we can reuse `utils::fn_def_id`.
    phlip9 committed Feb 4, 2021
    Configuration menu
    Copy the full SHA
    7b7e3ca View commit details
    Browse the repository at this point in the history

Commits on Feb 5, 2021

  1. fix typo

    TaKO8Ki committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    67d48e1 View commit details
    Browse the repository at this point in the history
  2. Use absolute path to Rust repo in ra_setup

    This will convert the path to the Rust repo to an absolute path. This is
    important for the clippy_lints/Cargo.toml file. Otherwise if a relative
    path is passed, rst-analyzer won't find the Rust repo, because it starts
    the relative path search from the clippy_lints dir, not the
    rust-clippy dir where the ra_setup command was run from.
    flip1995 committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    79dbf10 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    56f7fbb View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#6678 - TaKO8Ki:fix-typo, r=flip1995

    Fix typo
    
    This patch fixes a typo.
    
    changelog: none
    bors committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    89f266a View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#6679 - flip1995:ra_setup_abs_path, r=Manishearth

    Use absolute path to Rust repo in ra_setup
    
    This will convert the path to the Rust repo to an absolute path. This is
    important for the clippy_lints/Cargo.toml file. Otherwise if a relative
    path is passed, rst-analyzer won't find the Rust repo, because it starts
    the relative path search from the clippy_lints dir, not the
    rust-clippy dir where the ra_setup command was run from.
    
    changelog: none
    bors committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    a507c27 View commit details
    Browse the repository at this point in the history
  6. First version of the lint

    1c3t3a committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    eb9c669 View commit details
    Browse the repository at this point in the history
  7. Added documentation

    1c3t3a committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    f907986 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    55bfaa1 View commit details
    Browse the repository at this point in the history
  9. Fix let_underscore_drop implements Drop logic

    This fixes false positives and false negatives.
    camsteffen committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    ac5e9c8 View commit details
    Browse the repository at this point in the history
  10. Bump clippy version

    Mark-Simulacrum committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    a9ad492 View commit details
    Browse the repository at this point in the history
  11. tests: ignore check_that_clippy_has_the_same_major_version_as_rustc()…

    … inside the rustc repo.
    
    Do not check if clippy version matches rustc version when runnning tests inside the rustc repo.
    This makes sure that upstream rustc maintainers do not have to deal with our test failing/mismatching versions
    when the rustc version bump is happening.
    cc rust-lang#6683
    matthiaskrgr committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    93daf27 View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2021

  1. Add new lint filter_map_identity

    This commit adds a new lint named `filter_map_identity`. This lint is
    the same as `flat_map_identity` except that it checks for `filter_map`.
    
    Closes rust-lang#6643
    magurotuna committed Feb 6, 2021
    Configuration menu
    Copy the full SHA
    a60c143 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fbe436b View commit details
    Browse the repository at this point in the history
  3. lintcheck: update logs

    matthiaskrgr committed Feb 6, 2021
    Configuration menu
    Copy the full SHA
    cb30219 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    64982cc View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    10fbafa View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9ab505a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e1c284b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    6626295 View commit details
    Browse the repository at this point in the history
  9. Auto merge of rust-lang#6684 - matthiaskrgr:versiontest_dont_break_up…

    …stream, r=flip1995
    
    tests: ignore check_that_clippy_has_the_same_major_version_as_rustc()inside the rustc repo
    
    Do not check if clippy version matches rustc version when runnning tests inside the rustc repo.
    This makes sure that upstream rustc maintainers do not have to deal with our test failing/mismatching versions
    when the rustc version bump is happening.
    cc rust-lang#6683
    
    We already do the "don't run inside the rustc-repo" workaround for the dogfood test:
    https://github.com/rust-lang/rust-clippy/blob/a507c27660d05f37307369d30bee9e82ce3a11e1/tests/dogfood.rs#L16
    
    changelog: None
    bors committed Feb 6, 2021
    Configuration menu
    Copy the full SHA
    dfb34c0 View commit details
    Browse the repository at this point in the history
  10. Revert "Fixed for loop problem, corrected all occurences that got lin…

    …ted"
    
    This reverts commit 6626295.
    1c3t3a committed Feb 6, 2021
    Configuration menu
    Copy the full SHA
    cd67487 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    85c2b1e View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#81680 - camsteffen:primty, r=oli-obk

    Refactor `PrimitiveTypeTable` for Clippy
    
    I removed `PrimitiveTypeTable` and added `PrimTy::ALL` and `PrimTy::from_name` in its place. This allows Clippy to use `PrimTy::from_name` for the `builtin_type_shadow` lint, and a `const` list of primitive types is deleted from Clippy code (the goal). All changes should be a little faster, if anything.
    jonas-schievink committed Feb 6, 2021
    Configuration menu
    Copy the full SHA
    a5d442c View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    f1c1584 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    915e9b8 View commit details
    Browse the repository at this point in the history
  15. Test names were flipped.

    daxpedda committed Feb 6, 2021
    Configuration menu
    Copy the full SHA
    d4bc7d2 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    f0d3fd7 View commit details
    Browse the repository at this point in the history
  17. Hide clippy configuration option.

    Co-authored-by: Philipp Krones <hello@philkrones.com>
    daxpedda and flip1995 committed Feb 6, 2021
    Configuration menu
    Copy the full SHA
    8805931 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    f2391a5 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    8b89087 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    cd361a5 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    e2e33b4 View commit details
    Browse the repository at this point in the history
  22. Fux toml_unknown_key test.

    daxpedda committed Feb 6, 2021
    Configuration menu
    Copy the full SHA
    3c8f754 View commit details
    Browse the repository at this point in the history
  23. Document condition.

    daxpedda committed Feb 6, 2021
    Configuration menu
    Copy the full SHA
    ea0b832 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    fd8b5fa View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    2bffbfc View commit details
    Browse the repository at this point in the history
  26. Stabilize workspace wrapper.

    ehuss committed Feb 6, 2021
    Configuration menu
    Copy the full SHA
    0585c34 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    6b4789d View commit details
    Browse the repository at this point in the history
  28. Eat dogfood

    camsteffen committed Feb 6, 2021
    Configuration menu
    Copy the full SHA
    40ce056 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    dfe08f4 View commit details
    Browse the repository at this point in the history

Commits on Feb 7, 2021

  1. Auto merge of rust-lang#6682 - camsteffen:let-underscore-ref, r=llogiq

    Fix let_underscore_drop FP
    
    changelog: Fix let_underscore_drop false positives and negatives
    
    Fixes rust-lang#6633
    bors committed Feb 7, 2021
    Configuration menu
    Copy the full SHA
    d792210 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#6688 - rust-lang:triagebot_update, r=phansch

    Update triagebot.toml to new label names
    
    changelog: none
    bors committed Feb 7, 2021
    Configuration menu
    Copy the full SHA
    b36d1a4 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#6660 - camsteffen:path-to-local, r=llogiq

    Cleanup path-to-local checks
    
    changelog: none
    
    It seemed like too much ceremony going on to check if an expression matches a variable. So I created two util functions `path_to_local(Expr) -> Option<HirId>` and `path_to_local_id(Expr, HirId) -> bool` to make this easier, and used them wherever applicable.
    
    I changed logic in a few places to use `HirId` instead of `Symbol` where it was easy to do so. I believe this is more correct and may even fix some bugs.
    
    I also removed some calls to `qpath_res`. This is not needed if you are only looking for a `Res::Local`.
    
    As a note, I wanted to name the util functions in a way that encourages understanding of the HIR.
    bors committed Feb 7, 2021
    Configuration menu
    Copy the full SHA
    d51db24 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#6681 - 1c3t3a:1c3t3a-issue-6467, r=xFrednet,f…

    …lip1995,phansch
    
    Adds a new lint that checks if there is a semicolon on the last block statement if it returns nothing
    
    changelog: Added a new lint: `SEMICOLON_IF_NOTHING_RETURNED`
    fixes rust-lang#6467
    Adds the `SEMICOLON_IF_NOTHING_RETURNED` lint and therefore closes rust-lang#6467.
    bors committed Feb 7, 2021
    Configuration menu
    Copy the full SHA
    001185d View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#6685 - magurotuna:filter_map_identity, r=phansch

    Add new lint `filter_map_identity`
    
    <!--
    Thank you for making Clippy better!
    
    We're collecting our changelog from pull request descriptions.
    If your PR only includes internal changes, you can just write
    `changelog: none`. Otherwise, please write a short comment
    explaining your change.
    
    If your PR fixes an issue, you can add "fixes #issue_number" into this
    PR description. This way the issue will be automatically closed when
    your PR is merged.
    
    If you added a new lint, here's a checklist for things that will be
    checked during review or continuous integration.
    
    - \[x] Followed [lint naming conventions][lint_naming]
    - \[x] Added passing UI tests (including committed `.stderr` file)
    - \[x] `cargo test` passes locally
    - \[x] Executed `cargo dev update_lints`
    - \[x] Added lint documentation
    - \[x] Run `cargo dev fmt`
    
    [lint_naming]: https://rust-lang.github.io/rfcs/0344-conventions-galore.html#lints
    
    Note that you can skip the above if you are just opening a WIP PR in
    order to get feedback.
    
    Delete this line and everything above before opening your PR.
    -->
    
    This commit adds a new lint named filter_map_identity.
    This lint is the same as `flat_map_identity` except that it checks for the usage of `filter_map`.
    
    ---
    
    Closes rust-lang#6643
    
    changelog: Added a new lint: `filter_map_identity`
    bors committed Feb 7, 2021
    Configuration menu
    Copy the full SHA
    ad9ceee View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#6674 - phlip9:disallowed_functions, r=llogiq

    disallowed_methods: Support functions in addition to methods
    
    ## Context:
    
    Hey all! I have a particular use case where I'd like to ban certain functions in a code base I work on. For example, I want to ban `Instant::now()` (among others) as we have a time service for mocking time in deterministic simulation tests. Obviously, it doesn't make sense to include a lint like this for all clippy users. Imagine my excitement when I spotted the new `disallowed_methods` lint in clippy--perfect! Unfortunately, after playing around with it for a bit, I was frustrated to realize that it didn't support functions like `Instant::now()`, so I've added support for them in this PR.
    
    It might also make sense to rename the lint from `disallowed_methods` -> `disallowed_functions`, though I've held off from including that rename in this change, since I'm unsure of clippy's breaking change policy.
    
    ## Change
    
    Support functions in addition to methods. In other words, support:
    
    `disallowed_methods = ["alloc::vec::Vec::new"]` (a function) in addition to
    `disallowed_methods = ["alloc::vec::Vec::leak"]` (a method).
    
    Improve the documentation to clarify that users must specify the full qualified path for each disallowed function, which can be confusing for reexports. Include an example `clippy.toml`.
    
    Simplify the actual lint pass so we can reuse `utils::fn_def_id`.
    
    changelog: disallowed_method: Now supports functions in addition to methods
    bors committed Feb 7, 2021
    Configuration menu
    Copy the full SHA
    83b7b16 View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#6686 - matthiaskrgr:lintcheck_git, r=flip1995

    lintcheck: support git sources
    
    This adds support for git sources in `cargo dev-lintcheck`
    
    You can add a git source to `clippy_dev/lintcheck_crates.toml` by having a `git_url` and a `git_hash` key instead of the `versions` array.
    The repo will the be cloned and checked out to the requested commit before checking it with clippy.
    
    Fixes rust-lang/rust-clippy#6642
    
    changelog: lintcheck: support git sources
    bors committed Feb 7, 2021
    Configuration menu
    Copy the full SHA
    c1ce78f View commit details
    Browse the repository at this point in the history
  8. lintcheck: add a cmdline option --crates-toml <TOML PATH> to override…

    … crate sources file to use.
    
    Fixes rust-lang#6691
    matthiaskrgr committed Feb 7, 2021
    Configuration menu
    Copy the full SHA
    6f3eeac View commit details
    Browse the repository at this point in the history
  9. add a new lint bytes_nth

    TaKO8Ki committed Feb 7, 2021
    Configuration menu
    Copy the full SHA
    1c3033d View commit details
    Browse the repository at this point in the history
  10. Auto merge of rust-lang#6694 - matthiaskrgr:lintcheck-cfg, r=Manishearth

    lintcheck: add a cmdline option --crates-toml <TOML PATH> to override crate sources file to use.
    
    Fixes rust-lang#6691
    
    changelog: lintcheck: add --crates-toml  cmdline option to override default crates.toml file.
    bors committed Feb 7, 2021
    Configuration menu
    Copy the full SHA
    de35c29 View commit details
    Browse the repository at this point in the history
  11. Fix SourceMap::start_point

    `start_point` needs to return the *first* character's span, but it would
    previously call `find_width_of_character_at_span` which returns the span
    of the *last* character. The implementation is now fixed.
    
    Other changes:
    
    - Docs for start_point, end_point, find_width_of_character_at_span
      updated
    
    - Minor simplification in find_width_of_character_at_span code
    
    Fixes rust-lang#81800
    osa1 committed Feb 7, 2021
    Configuration menu
    Copy the full SHA
    7e94641 View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2021

  1. Configuration menu
    Copy the full SHA
    fd35517 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#6696 - dtolnay-contrib:regex, r=Manishearth

    Downgrade trivial_regex to nursery
    
    See rust-lang#6690. I think there is still value in a trivial_regex lint, but only if clippy can tell that the regex is only ever constructed and applied to a single input.
    
    ```rust
    let regex = Regex::new("trivial_regex")?;
    println!("{}", regex.is_match(s));
    // `regex` never used again
    ```
    
    ---
    
    changelog: remove `trivial_regex` from default set of enabled lints
    bors committed Feb 8, 2021
    Configuration menu
    Copy the full SHA
    4bbd7e4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1d30422 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5db48a3 View commit details
    Browse the repository at this point in the history
  5. Use path_to_local_id

    camsteffen committed Feb 8, 2021
    Configuration menu
    Copy the full SHA
    37555f8 View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2021

  1. Rename HIR UnOp variants

    This renames the variants in HIR UnOp from
    
        enum UnOp {
            UnDeref,
            UnNot,
            UnNeg,
        }
    
    to
    
        enum UnOp {
            Deref,
            Not,
            Neg,
        }
    
    Motivations:
    
    - This is more consistent with the rest of the code base where most enum
      variants don't have a prefix.
    
    - These variants are never used without the `UnOp` prefix so the extra
      `Un` prefix doesn't help with readability. E.g. we don't have any
      `UnDeref`s in the code, we only have `UnOp::UnDeref`.
    
    - MIR `UnOp` type variants don't have a prefix so this is more
      consistent with MIR types.
    
    - "un" prefix reads like "inverse" or "reverse", so as a beginner in
      rustc code base when I see "UnDeref" what comes to my mind is
      something like "&*" instead of just "*".
    osa1 committed Feb 9, 2021
    Configuration menu
    Copy the full SHA
    34b373d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    775ce47 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#6704 - rust-lang:flip1995-patch-1, r=phansch

    Rename "good first issue" back to "good-first-issue"
    
    changelog: none
    bors committed Feb 9, 2021
    Configuration menu
    Copy the full SHA
    03a0dd5 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b932587 View commit details
    Browse the repository at this point in the history
  5. Remove rustfmt from rust-toolchain file

    We use latest nightly rustfmt in our tests anyway
    flip1995 committed Feb 9, 2021
    Configuration menu
    Copy the full SHA
    03737e2 View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#6709 - rust-lang:flip1995-patch-1, r=matthias…

    …krgr
    
    Remove rustfmt from rust-toolchain file
    
    We use latest nightly rustfmt in our tests anyway
    
    r? `@matthiaskrgr`
    
    changelog: none
    bors committed Feb 9, 2021
    Configuration menu
    Copy the full SHA
    08b4d50 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1eb79f3 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    638980a View commit details
    Browse the repository at this point in the history
  9. Remove unnecessary note on errors

    Seeing the trait definition doesn't help with implementation not general
    enough errors, so don't make the error message larger to show it.
    matthewjasper committed Feb 9, 2021
    Configuration menu
    Copy the full SHA
    c2066cf View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    daab6db View commit details
    Browse the repository at this point in the history
  11. Report "nice" placeholder errors more often

    If we have a cause containing `ValuePairs::PolyTraitRefs` but neither
    TraitRef has any escaping bound regions then we report the same error as
    for `ValuePairs::TraitRefs`.
    matthewjasper committed Feb 9, 2021
    Configuration menu
    Copy the full SHA
    94c11df View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    9337d4f View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2021

  1. Auto merge of rust-lang#6698 - camsteffen:path-to-local, r=phansch

    More path-to-local fixes
    
    changelog: Fix some detections of variable usage in closures
    bors committed Feb 10, 2021
    Configuration menu
    Copy the full SHA
    0e371b8 View commit details
    Browse the repository at this point in the history
  2. Update clippy_lints/src/methods/bytes_nth.rs

    Co-authored-by: Phil Hansch <dev@phansch.net>
    TaKO8Ki and phansch committed Feb 10, 2021
    Configuration menu
    Copy the full SHA
    932cc08 View commit details
    Browse the repository at this point in the history
  3. add some test cases

    TaKO8Ki committed Feb 10, 2021
    Configuration menu
    Copy the full SHA
    5996ae1 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#6687 - ehuss:stabilize-wrapper, r=flip1995

    Stabilize workspace wrapper.
    
    This fixes it so that `cargo clippy` doesn't share the same cache artifacts as `cargo check`. The Cargo side was stabilized a while ago (rust-lang/cargo#8976), so this should be ready to go. I'm not aware of any blockers or concerns.
    
    Closes rust-lang#4612
    
    ---
    
    changelog: `cargo clippy` no longer shares the same build cache as `cargo check`.
    bors committed Feb 10, 2021
    Configuration menu
    Copy the full SHA
    9c0ae2a View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#6695 - TaKO8Ki:add-bytes-nth, r=phansch

    New lint: `bytes_nth`
    
    This pull request adds a new lint named `bytes_nth`.
    
    ---
    closes: rust-lang/rust-clippy#6391
    
    changelog: Added a new lint: `bytes_nth`
    bors committed Feb 10, 2021
    Configuration menu
    Copy the full SHA
    b5e4389 View commit details
    Browse the repository at this point in the history
  6. Fix typo

    alpaca-tc committed Feb 10, 2021
    Configuration menu
    Copy the full SHA
    94b8f23 View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#6714 - alpaca-tc:fixed_tiny_typo, r=flip1995

    Fix typo
    
    changelog: none
    bors committed Feb 10, 2021
    Configuration menu
    Copy the full SHA
    a6d6b1b View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#6657 - ThibsG:FromIterParens, r=llogiq

    Fix suggestions that need parens in `from_iter_instead_of_collect` lint
    
    Fixes broken suggestions that need parens (i.e.: range)
    
    Fixes: rust-lang#6648
    
    changelog: none
    bors committed Feb 10, 2021
    Configuration menu
    Copy the full SHA
    3784cdf View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    f852160 View commit details
    Browse the repository at this point in the history

Commits on Feb 11, 2021

  1. Auto merge of rust-lang#6650 - daxpedda:cargo-common-metadata-publish…

    …, r=flip1995
    
    Fix cargo_common_metadata warning on `publish = false`.
    
    I believe `cargo_common_metadata` shouldn't trigger when `publish = false`, not sure if everybody agrees.
    Made some tests to handle all edge-cases.
    
    Fixes rust-lang#6649.
    
    changelog: [`cargo_common_metadata`](https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata): No longer lints if [`publish = false`](https://doc.rust-lang.org/cargo/reference/manifest.html#the-publish-field) is defined in the manifest
    bors committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    beb49ba View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1025cd3 View commit details
    Browse the repository at this point in the history
  3. lintcheck: make the log file be ${source-file}-logs.txt

    this allows us to check multiple source.tomls and not worry about overriding our logfiles accidentally
    matthiaskrgr committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    c7241b6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    cfe154b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5e29aa6 View commit details
    Browse the repository at this point in the history
  6. lintcheck: collect ICEs

    matthiaskrgr committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    a6d493d View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#6708 - matthiaskrgr:lintcheck, r=flip1995

    some more lintcheck changes
    
    * Explain why tokei is commented out in the lintcheck sources.
    * If we specify a custom sources.toml, don't override the preexisting lintcheck logs, but rather start a new log with the filename depending on the sources.toml name.
    * Start adding a readme.md to clippy_dev and add some information on how to use the lintcheck subcommand.
    * Add support for path/local sources (I needed this for the next item which is: )
    * Collect ICEs that happen while clippy checks crates
    
    changelog: more lintcheck changes
    bors committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    8dbcffe View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    00f9981 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    4efc454 View commit details
    Browse the repository at this point in the history
  10. Auto merge of rust-lang#6718 - flip1995:rustup, r=flip1995

    Rustup
    
    r? `@ghost`
    
    changelog: none
    bors committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    70c0f90 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    d2e2f64 View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2021

  1. Configuration menu
    Copy the full SHA
    dfa581f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9bbd3e0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0bf1d73 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9526c0c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    79f6f11 View commit details
    Browse the repository at this point in the history
  6. Make ProjectionTy::trait_ref truncate substs again

    Also make sure that type arguments of associated types are printed in
    some error messages.
    matthewjasper committed Feb 13, 2021
    Configuration menu
    Copy the full SHA
    dfee89f View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d785c8c View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    eeb82e4 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    be1ed00 View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2021

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

Commits on Feb 15, 2021

  1. Configuration menu
    Copy the full SHA
    a491f51 View commit details
    Browse the repository at this point in the history
  2. Fix test issue reference

    edward-shen committed Feb 15, 2021
    Configuration menu
    Copy the full SHA
    f856224 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a4b2faf View commit details
    Browse the repository at this point in the history
  4. Simplify pattern grammar by allowing nested leading vert

    Along the way, we also implement a handful of diagnostics improvements
    and fixes, particularly with respect to the special handling of `||` in
    place of `|` and when there are leading verts in function params, which
    don't allow top-level or-patterns anyway.
    mark-i-m committed Feb 15, 2021
    Configuration menu
    Copy the full SHA
    aee1e59 View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2021

  1. Configuration menu
    Copy the full SHA
    b86c5db View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e39c3c0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1b86ad8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f99e152 View commit details
    Browse the repository at this point in the history
  5. Update w/ comments

    JulianKnodt committed Feb 16, 2021
    Configuration menu
    Copy the full SHA
    b97951b View commit details
    Browse the repository at this point in the history
  6. Remove ordering hint

    JulianKnodt committed Feb 16, 2021
    Configuration menu
    Copy the full SHA
    f520295 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a98b22c View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    61bb183 View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2021

  1. Rollup merge of rust-lang#79981 - camelid:overflowing_literals-infere…

    …nce-error, r=lcnr
    
    Add 'consider using' message to overflowing_literals
    
    Fixes rust-lang#79744.
    
    Ironically, the `overflowing_literals` handler for binary or hex already
    had this message! You would think it would be the other way around :)
    
    cc ``@scottmcm``
    Dylan-DPC committed Feb 17, 2021
    Configuration menu
    Copy the full SHA
    e19d6fc View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#81860 - osa1:issue81800, r=estebank

    Fix SourceMap::start_point
    
    `start_point` needs to return the *first* character's span, but it would
    previously call `find_width_of_character_at_span` which returns the span
    of the *last* character. The implementation is now fixed.
    
    Other changes:
    
    - Docs for start_point, end_point, find_width_of_character_at_span
      updated
    
    - Minor simplification in find_width_of_character_at_span code
    
    Fixes rust-lang#81800
    Dylan-DPC committed Feb 17, 2021
    Configuration menu
    Copy the full SHA
    06bb4e7 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#81869 - mark-i-m:leading-vert, r=petrochenkov

    Simplify pattern grammar, improve or-pattern diagnostics
    
    This implements the change under FCP in rust-lang#81415. It allows nested or-patterns to contain a leading `|`, simplifying the [grammar for patterns](https://github.com/rust-lang/reference/pull/957/files?short_path=cc629f1#diff-cc629f15712821139bc706c63b3845ab59a008e2a998e08ffad42e3aebcbcbe2).
    
    Along the way, we also improve the diagnostics around a few specially-handled cases, such as using `||` instead of `|`, using or-patterns in fn params, including the leading `|` in the pattern span, etc.
    
    r? ```@petrochenkov```
    Dylan-DPC committed Feb 17, 2021
    Configuration menu
    Copy the full SHA
    6ea042c View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#81972 - matthewjasper:hrtb-error-cleanup, r…

    …=nikomatsakis
    
    Placeholder lifetime error cleanup
    
    - Remove note of trait definition
    - Avoid repeating the same self type
    - Use original region names when possible
    - Use this error kind more often
    - Print closure signatures when they are suppose to implement `Fn*` traits
    
    Works towards rust-lang#57374
    
    r? ``@nikomatsakis``
    Dylan-DPC committed Feb 17, 2021
    Configuration menu
    Copy the full SHA
    6e082bd View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#81993 - flip1995:clippyup, r=Manishearth

    Update Clippy
    
    Biweekly Clippy update
    
    r? ````@Manishearth````
    Dylan-DPC committed Feb 17, 2021
    Configuration menu
    Copy the full SHA
    7b293bb View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#82007 - sexxi-goose:reborrow, r=nikomatsakis

    Implement reborrow for closure captures
    
    The strategy for captures is detailed here with examples: https://hackmd.io/PzxYMPY4RF-B9iH9uj9GTA
    
    Key points:
    - We only need to reborrow a capture in case of move closures.
      - If we mutate something via a `&mut` we store it as a `MutBorrow`/`UniqueMuBorrow` of the path containing the `&mut`,
      - Similarly, if it's read via `&` ref we just store it as a `ImmBorrow` of the path containing the `&` ref.
      - If a path doesn't deref a `&mut`, `&`, then that path is captured by Move.
      - If the use of a path results in a move when the closure is called, then that path is truncated before any deref and the truncated path is moved into the closure.
    
    - In the case of non-move closure if a use of a path results in a move, then the path is truncated before any deref and the truncated path is moved into the closure.
    
    Note that the implementation differs a bit from the document to allow for truncated path to be used in the ClosureKind analysis that happens as part of the first capture analysis pass.
    
    Closes: rust-lang/project-rfc-2229#31
    
    r? ```@nikomatsakis```
    Dylan-DPC committed Feb 17, 2021
    Configuration menu
    Copy the full SHA
    f5417bd View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#82055 - JulianKnodt:ty_where_const, r=estebank

    Add diagnostics for specific cases for const/type mismatch err
    
    For now, this adds at least more information so better diagnostics can be emitted for const mismatch errors.
    
    I'm not sure what exactly we want to emit, so I've left notes there temporarily, also to see if this is the right approach
    
    r? ``@lcnr``
    cc: ``@estebank``
    Dylan-DPC committed Feb 17, 2021
    Configuration menu
    Copy the full SHA
    8e87fe9 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#82066 - matthewjasper:trait-ref-fix, r=jack…

    …h726
    
    Ensure valid TraitRefs are created for GATs
    
    This fixes `ProjectionTy::trait_ref` to use the correct substs. Places that need all of the substs have been updated to not use `trait_ref`.
    
    r? ``@jackh726``
    Dylan-DPC committed Feb 17, 2021
    Configuration menu
    Copy the full SHA
    a96e072 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#82136 - edward-shen:mismatched-subst-and-hi…

    …r, r=lcnr
    
    Fix ICE: Use delay_span_bug for mismatched subst/hir arg
    
    Fixes rust-lang#82126.
    Dylan-DPC committed Feb 17, 2021
    Configuration menu
    Copy the full SHA
    25835bc View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#82196 - Manishearth:display-caveat, r=m-ou-se

    Add caveat to Path::display() about lossiness
    
    It's worth calling out that this API may do a lossy display.
    
    r? ``@m-ou-se``
    Dylan-DPC committed Feb 17, 2021
    Configuration menu
    Copy the full SHA
    116f2e5 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#82198 - SkiFire13:optimize-iter-is-sorted, …

    …r=sfackler
    
    Use internal iteration in Iterator::is_sorted_by
    Dylan-DPC committed Feb 17, 2021
    Configuration menu
    Copy the full SHA
    7bd07a5 View commit details
    Browse the repository at this point in the history