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

Make clippy a git subtree instead of a git submodule #70655

Merged
merged 8,408 commits into from
May 2, 2020
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Apr 8, 2020

  1. Auto merge of rust-lang#5438 - flip1995:rollup-pi762oy, r=flip1995

    Rollup of 11 pull requests
    
    Successful merges:
    
     - rust-lang#5406 (Fix update_lints)
     - rust-lang#5409 (Downgrade let_unit_value to pedantic)
     - rust-lang#5410 (Downgrade trivially_copy_pass_by_ref to pedantic)
     - rust-lang#5412 (Downgrade inefficient_to_string to pedantic)
     - rust-lang#5415 (Add new lint for `Result<T, E>.map_or(None, Some(T))`)
     - rust-lang#5417 (Update doc links and mentioned names in docs)
     - rust-lang#5419 (Downgrade unreadable_literal to pedantic)
     - rust-lang#5420 (Downgrade new_ret_no_self to pedantic)
     - rust-lang#5422 (CONTRIBUTING.md: fix broken triage link)
     - rust-lang#5424 (Incorrect suspicious_op_assign_impl)
     - rust-lang#5425 (Ehance opt_as_ref_deref lint.)
    
    Failed merges:
    
     - rust-lang#5345 (Add lint for float in array comparison)
     - rust-lang#5411 (Downgrade implicit_hasher to pedantic)
     - rust-lang#5428 (Move cognitive_complexity to nursery)
    
    r? @ghost
    
    changelog: rollup
    bors committed Apr 8, 2020
    Configuration menu
    Copy the full SHA
    f8308c8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    899a1b5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5f92fae View commit details
    Browse the repository at this point in the history
  4. Check fn header along with decl when suggesting to implement trait

    When checking for functions that are potential candidates for trait
    implementations check the function header to make sure modifiers like
    asyncness, constness and safety match before triggering the lint.
    
    Fixes rust-lang#5413, rust-lang#4290
    rabisg0 committed Apr 8, 2020
    Configuration menu
    Copy the full SHA
    c2e5534 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#5428 - dtolnay:cognitive, r=flip1995

    Move cognitive_complexity to nursery
    
    As discussed in rust-lang/rust-clippy#5418 (comment); Clippy's current understanding of cognitive complexity is not good enough yet at analyzing code for understandability to have this lint be enabled by default.
    
    changelog: Remove cognitive_complexity from default set of enabled lints
    bors committed Apr 8, 2020
    Configuration menu
    Copy the full SHA
    7bfdee5 View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#5437 - rabisg0:should-impl-trait, r=flip1995

    Check fn header along with decl when suggesting to implement trait
    
    When checking for functions that are potential candidates for trait
    implementations check the function header to make sure modifiers like
    asyncness, constness and safety match before triggering the lint.
    
    Fixes rust-lang#5413, rust-lang#4290
    
    changelog: check fn header along with decl for should_implement_trait
    bors committed Apr 8, 2020
    Configuration menu
    Copy the full SHA
    940bbd6 View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#5411 - dtolnay:hasher, r=flip1995

    Downgrade implicit_hasher to pedantic
    
    From the [documentation](https://rust-lang.github.io/rust-clippy/master/index.html#implicit_hasher), this lint is intended to suggest:
    
    ```diff
    - pub fn foo(map: &mut HashMap<i32, i32>) { }
    
    + pub fn foo<S: BuildHasher>(map: &mut HashMap<i32, i32, S>) { }
    ```
    
    I think this is pedantic. I get that this lint can benefit core libraries like serde, but that's exactly the use case for pedantic lints; a library like serde will [enable clippy_pedantic](https://github.com/serde-rs/json/blob/fd6741f4b0b3fc90a58a6f578e33a9adc6403f3f/src/lib.rs#L304) and take the time to go through everything possible. Similar for libraries doing a libz blitz style checkup before committing to a 1.0 release; it would make sense to run through all the available pedantic lints then.
    
    But otherwise, for most codebases and certainly for industrial codebases, the above suggested change just makes the codebase more obtuse for questionable benefit.
    
    changelog: Remove implicit_hasher from default set of enabled lints
    bors committed Apr 8, 2020
    Configuration menu
    Copy the full SHA
    c25f26d View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2020

  1. Configuration menu
    Copy the full SHA
    d440935 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0d00eaf View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    03f584c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b4ff774 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2153abb View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6217671 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    bcbb9d9 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    1bab67c View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    d3167c6 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    3c738b2 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    c7b5e30 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    84ae3d8 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    f637c45 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    4e01ca3 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    4449cc7 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    380f721 View commit details
    Browse the repository at this point in the history
  17. Update doc generation script

    ThibsG committed Apr 9, 2020
    Configuration menu
    Copy the full SHA
    629cc4a View commit details
    Browse the repository at this point in the history
  18. Check for clone-on-copy in argument positions

    Earlier if arguments to method calls matched the above pattern they were
    not reported. This patch ensures such arguments are checked as well.
    
    Fixes rust-lang#5436
    rabisg0 committed Apr 9, 2020
    Configuration menu
    Copy the full SHA
    183c4ab View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    90fb50f View commit details
    Browse the repository at this point in the history
  20. Auto merge of rust-lang#5442 - rust-lang:revert-5420-newret, r=Manish…

    …earth
    
    Revert "Downgrade new_ret_no_self to pedantic"
    
    Reverts rust-lang/rust-clippy#5420
    
    This got through with the big rollup merge, where I didn't recheck every PR of the rollup. Reverting because of the reason given in rust-lang/rust-clippy#5420 (comment) by @joshtriplett
    
    changelog: Move new_ret_no_self back to style category
    bors committed Apr 9, 2020
    Configuration menu
    Copy the full SHA
    34763a5 View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2020

  1. Configuration menu
    Copy the full SHA
    89f6012 View commit details
    Browse the repository at this point in the history
  2. Rustup to rust-lang#70913

    phansch committed Apr 10, 2020
    Configuration menu
    Copy the full SHA
    3ef1dab View commit details
    Browse the repository at this point in the history
  3. Update documentation for new_ret_no_self

    The lint was changed to be more lenient than the documentation implies in PR rust-lang#3338.
    Related issue rust-lang#3313
    Emerentius committed Apr 10, 2020
    Configuration menu
    Copy the full SHA
    ed72dc4 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#5447 - phansch:rustuppp, r=matthiaskrgr

    Rustup to rust-lang#70913
    
    changelog: none
    bors committed Apr 10, 2020
    Configuration menu
    Copy the full SHA
    ba7076f View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#5446 - rust-lang:gimme-a-second, r=flip1995

    compare with the second largest instead of the smallest variant
    
    This should make the lint less noisy for now. See [my comment](rust-lang/rust-clippy#5418 (comment)) to issue rust-lang#5418.
    
    ---
    
    changelog: none
    bors committed Apr 10, 2020
    Configuration menu
    Copy the full SHA
    0353f21 View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#5441 - rabisg0:fix/clone-on-copy, r=phansch

    Check for clone-on-copy in argument positions
    
    Earlier if arguments to method calls matched the above pattern they were
    not reported. This patch ensures such arguments are checked as well.
    
    Fixes rust-lang#5436
    
    changelog: apply clone_on_copy lint to func args as well
    bors committed Apr 10, 2020
    Configuration menu
    Copy the full SHA
    5e8c0c5 View commit details
    Browse the repository at this point in the history
  7. rustup rust-lang#69745

    matthiaskrgr committed Apr 10, 2020
    Configuration menu
    Copy the full SHA
    f7bdead View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2020

  1. rustup rust-lang#70986

    matthiaskrgr committed Apr 11, 2020
    Configuration menu
    Copy the full SHA
    4352c85 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#5450 - matthiaskrgr:rustup_41, r=phansch

    rustup rust-lang#69745
    
    changelog: none
    bors committed Apr 11, 2020
    Configuration menu
    Copy the full SHA
    97aa8dc View commit details
    Browse the repository at this point in the history

Commits on Apr 12, 2020

  1. Allow UUID style formatting for inconsistent_digit_grouping lint

    This change adds a check to the `inconsistent_digit_grouping` to add a check for
    NumericLiterals that follow the UUID format of 8-4-4-4-12.
    
    If the NumericLiteral matches the UUID format, no further inconsistent grouping checks
    will be performed.
    
    Closes rust-lang#5431
    xyzd committed Apr 12, 2020
    Configuration menu
    Copy the full SHA
    a296058 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#5451 - xyzd:allow-uuid-format-digit-grouping,…

    … r=phansch
    
    Allow UUID style formatting for `inconsistent_digit_grouping` lint
    
    This change adds a check to the `inconsistent_digit_grouping` to add a check for
    NumericLiterals that follow the UUID format of 8-4-4-4-12.
    
    If the NumericLiteral matches the UUID format, no further inconsistent grouping checks
    will be performed.
    
    Closes rust-lang#5431
    
    changelog: Allow UUID style formatting for `inconsistent_digit_grouping` lint
    bors committed Apr 12, 2020
    Configuration menu
    Copy the full SHA
    af5940b View commit details
    Browse the repository at this point in the history
  3. verbose_bit_mask: fix bit mask used in docs

    Change the existing hex bit mask (`0x1111`) to a binary one (`0b1111`).
    
    The former does not seem to have anything to do with trailing zeros and is
    probably a typo.
    spl committed Apr 12, 2020
    Configuration menu
    Copy the full SHA
    c4e3ae4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1d1b6d8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    79982a2 View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#5454 - spl:patch-1, r=phansch

    verbose_bit_mask: fix bit mask used in docs
    
    changelog: fixes verbose_bit_mask docs
    bors committed Apr 12, 2020
    Configuration menu
    Copy the full SHA
    e29d550 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    83874d0 View commit details
    Browse the repository at this point in the history
  8. cargo dev fmt

    phansch committed Apr 12, 2020
    Configuration menu
    Copy the full SHA
    a524be6 View commit details
    Browse the repository at this point in the history
  9. update lints

    Emerentius committed Apr 12, 2020
    Configuration menu
    Copy the full SHA
    e98c7a4 View commit details
    Browse the repository at this point in the history

Commits on Apr 13, 2020

  1. Disallow bit-shifting in integer_arithmetic lint

    With this change, the lint checks all operations that are defined as
    being capable of overflow in the Rust Reference.
    michaelsproul committed Apr 13, 2020
    Configuration menu
    Copy the full SHA
    23df4a0 View commit details
    Browse the repository at this point in the history
  2. Fixes rust-lang#5405: redundant clone false positive with arrays

    Check whether slice elements implement Copy before suggesting to drop
    the clone method
    rabisg0 committed Apr 13, 2020
    Configuration menu
    Copy the full SHA
    ab3946d View commit details
    Browse the repository at this point in the history
  3. Cleanup: Use our sym! macro more

    It's much shorter that Symbol::intern and the result should still be
    clear.
    phansch committed Apr 13, 2020
    Configuration menu
    Copy the full SHA
    31c5664 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e47db67 View commit details
    Browse the repository at this point in the history
  5. result_map_unit_fn: Fix incorrect UI tests

    `x` and the `HasResult` struct were missing in this file.
    phansch committed Apr 13, 2020
    Configuration menu
    Copy the full SHA
    9a52d52 View commit details
    Browse the repository at this point in the history
  6. Temporarily disable rustfmt integration test

    Running rustfmt from master is currently broken:
    rust-lang#71077
    phansch committed Apr 13, 2020
    Configuration menu
    Copy the full SHA
    8ad1d78 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a4deb5a View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#5461 - phansch:disable_rustfmt_integration_te…

    …st, r=matthiaskrgr
    
    Temporarily disable rustfmt integration test
    
    Running rustfmt from master is currently broken and [fails our bors build](https://github.com/rust-lang/rust-clippy/runs/582066368#step:10:19):
    rust-lang#71077
    
    changelog: none
    bors committed Apr 13, 2020
    Configuration menu
    Copy the full SHA
    6d4cc56 View commit details
    Browse the repository at this point in the history
  9. Auto merge of rust-lang#5448 - Emerentius:update_new_ret_no_self_docs…

    …, r=phansch
    
    Update documentation for new_ret_no_self
    
    changelog: Update documentation for lint new_ret_no_self to reflect that the return type must only contain `Self`, not be `Self`
    
    The lint was changed to be more lenient than the documentation implies in PR rust-lang#3338 (Related issue rust-lang#3313)
    bors committed Apr 13, 2020
    Configuration menu
    Copy the full SHA
    54344c7 View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2020

  1. Auto merge of rust-lang#5458 - phansch:is-proc-macro-attr, r=matthias…

    …krgr
    
    Cleanup: Use rustc's is_proc_macro_attr
    
    It's doing exactly the same: https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_ast/expand/mod.rs.html#8-12
    
    changelog: none
    bors committed Apr 14, 2020
    Configuration menu
    Copy the full SHA
    aa08c39 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#5453 - rabisg0:fix/redundant_clone, r=phansch

    Fixes rust-lang#5405: redundant clone false positive with arrays
    
    Check whether slice elements implement Copy before suggesting to drop
    the clone method
    
    changelog: add a check for slice indexing on redundant_clone lint
    bors committed Apr 14, 2020
    Configuration menu
    Copy the full SHA
    74e9256 View commit details
    Browse the repository at this point in the history
  3. rustup rust-lang#70643

    matthiaskrgr committed Apr 14, 2020
    Configuration menu
    Copy the full SHA
    c1f2da4 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#5463 - matthiaskrgr:rustup_42, r=phansch

    rustup rust-lang#70643
    
    changelog: none
    bors committed Apr 14, 2020
    Configuration menu
    Copy the full SHA
    85e8b64 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#5457 - phansch:sym, r=matthiaskrgr

    Cleanup: Use our `sym!` macro more
    
    It's much shorter than Symbol::intern and the effect should still be clear
    
    ---
    
    changelog: none
    bors committed Apr 14, 2020
    Configuration menu
    Copy the full SHA
    d236b30 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9eda46e View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#5460 - phansch:fix_incorrect_tests, r=matthia…

    …skrgr
    
    result_map_unit_fn: Fix incorrect UI tests
    
    `x` and the `HasResult` struct were missing in this file.
    
    changelog: none
    bors committed Apr 14, 2020
    Configuration menu
    Copy the full SHA
    3c77188 View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#5449 - phansch:diagnostic-items, r=matthiaskrgr

    Make use of more diagnostic items
    
    This makes use of some (not all) already existing diagnostic items. Specifically:
    
    * 79982a2: `core::mem::uninitialized`, `core::mem::zeroed`, `alloc::sync::Arc`, `alloc::sync::Rc`
    * 83874d0: `Option` and `Result`
    
    cc rust-lang#5393
    
    changelog: none
    bors committed Apr 14, 2020
    Configuration menu
    Copy the full SHA
    81b3e70 View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2020

  1. Refactor: Use rustc's match_def_path

    This replaces our match_def_path implementation with the rustc one.
    
    Note that we can't just use it in all call sites because of the
    `&[&str]` / `&[Symbol]` difference in Clippy/rustc.
    phansch committed Apr 15, 2020
    Configuration menu
    Copy the full SHA
    9ec95af View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#5452 - phansch:match_def_path_refactor, r=mat…

    …thiaskrgr
    
    Refactor: Use rustc's `match_def_path`
    
    This replaces our match_def_path implementation with the rustc one.
    
    Note that we can't just use it in all call sites because of the
    `&[&str]` / `&[Symbol]` difference in Clippy/rustc.
    
    changelog: none
    bors committed Apr 15, 2020
    Configuration menu
    Copy the full SHA
    c6cc07a View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#5345 - Toxyxer:add-lint-for-float-in-array-co…

    …mparison, r=flip1995
    
    Add lint for float in array comparison
    
    Fixes rust-lang#4277
    changelog:
    - Added new handler for expression of index kind (e.g. `arr[i]`). It returns a constant when both array and index are constant, or when the array is constant and all values are equal.
    - Trigger float_cmp and float_cmp_const lint when comparing arrays. Allow for comparison when one of the arrays contains only zeros or infinities.
    - Added appropriate tests for such cases.
    bors committed Apr 15, 2020
    Configuration menu
    Copy the full SHA
    a96f874 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#5464 - matthiaskrgr:dep_compiletest, r=phansch

    deps: bump compiletest-rs from 0.4 to 0.5
    
    changelog: none
    bors committed Apr 15, 2020
    Configuration menu
    Copy the full SHA
    c496f4e View commit details
    Browse the repository at this point in the history
  5. large_enum_variant: Report sizes of variants

    This reports the sizes of the largest and second-largest variants.
    phansch committed Apr 15, 2020
    Configuration menu
    Copy the full SHA
    69c3e9c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d3ebd06 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    512f23f View commit details
    Browse the repository at this point in the history
  8. Working basic dereference clip

    tommilligan authored and ThibsG committed Apr 15, 2020
    Configuration menu
    Copy the full SHA
    b2d9868 View commit details
    Browse the repository at this point in the history
  9. Global rework + fix imports

    ThibsG committed Apr 15, 2020
    Configuration menu
    Copy the full SHA
    6b4ab82 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    c113243 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    b6d4330 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    72b9ae2 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    3c2bbcf View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    0441525 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    ce372c1 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    216371d View commit details
    Browse the repository at this point in the history
  17. add some tests

    yaahc committed Apr 15, 2020
    Configuration menu
    Copy the full SHA
    a3ce88b View commit details
    Browse the repository at this point in the history
  18. revert the damn fmt changes

    yaahc committed Apr 15, 2020
    Configuration menu
    Copy the full SHA
    6250110 View commit details
    Browse the repository at this point in the history
  19. rustup rust-lang#71116

    matthiaskrgr committed Apr 15, 2020
    Configuration menu
    Copy the full SHA
    7215495 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    a353f0f View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    a9a4c8e View commit details
    Browse the repository at this point in the history
  22. Rollup merge of rust-lang#5226 - ThibsG:DerefExplicit1566, r=flip1995

    Add lint for explicit deref and deref_mut method calls
    
    This PR adds the lint `explicit_deref_method` that suggests replacing `deref()` and `deref_mut()` with `&*a` and `&mut *a`.
    
    It doesn't lint inside macros.
    
    This PR is the continuation of  rust-lang#3258.
    
    changelog: Add lint `explicit_deref_method`.
    
    Fixes: rust-lang#1566
    flip1995 committed Apr 15, 2020
    Configuration menu
    Copy the full SHA
    3481bf4 View commit details
    Browse the repository at this point in the history
  23. Rollup merge of rust-lang#5248 - ThibsG:ConstValues, r=flip1995

    Add lint on large non scalar const
    
    This PR adds the new lint `non_scalar_const` that aims to warn against `const` declaration of large arrays. For performance, because of inlining, large arrays should be preferably declared as `static`.
    
    Note: i made this one to warn on all const arrays, whether they are in a body function or not. I don't know if this is really necessary, i could just reduce this lint to variables out of function scope.
    
    Fixes: rust-lang#400
    
    changelog: add new lint for large non-scalar types declared as const
    flip1995 committed Apr 15, 2020
    Configuration menu
    Copy the full SHA
    ceea3c6 View commit details
    Browse the repository at this point in the history
  24. Rollup merge of rust-lang#5430 - michaelsproul:integer-arithmetic, r=…

    …flip1995
    
    Disallow bit-shifting in integer_arithmetic
    
    Make the `integer_arithmetic` lint detect all the operations that are defined as being capable of overflow in the [Rust Reference](https://doc.rust-lang.org/reference/expressions/operator-expr.html#overflow), by also linting for bit-shifting operations (`<<`, `>>`).
    
    changelog: Disallow bit-shifting in `integer_arithmetic`
    flip1995 committed Apr 15, 2020
    Configuration menu
    Copy the full SHA
    2538e63 View commit details
    Browse the repository at this point in the history
  25. Rollup merge of rust-lang#5466 - phansch:large-enum-variant-output, r…

    …=flip1995
    
    large_enum_variant: Report sizes of variants
    
    This reports the sizes of the largest and second-largest variants.
    
    Closes rust-lang#5459
    
    changelog: `large_enum_variant`: Report the sizes of the largest and second-largest variants.
    flip1995 committed Apr 15, 2020
    Configuration menu
    Copy the full SHA
    071a590 View commit details
    Browse the repository at this point in the history
  26. Rollup merge of rust-lang#5468 - Toxyxer:zero-single-char-names, r=fl…

    …ip1995
    
    Zero single char names
    
    Fixes: rust-lang#4086
    
    changelog:
    - Make the inequality strict
    flip1995 committed Apr 15, 2020
    Configuration menu
    Copy the full SHA
    19183a6 View commit details
    Browse the repository at this point in the history
  27. Auto merge of rust-lang#5470 - flip1995:rollup-cvkuiza, r=flip1995

    Rollup of 5 pull requests
    
    Successful merges:
    
     - rust-lang#5226 (Add lint for explicit deref and deref_mut method calls)
     - rust-lang#5248 (Add lint on large non scalar const)
     - rust-lang#5430 (Disallow bit-shifting in integer_arithmetic)
     - rust-lang#5466 (large_enum_variant: Report sizes of variants)
     - rust-lang#5468 (Zero single char names)
    
    Failed merges:
    
    r? @ghost
    
    changelog: rollup
    bors committed Apr 15, 2020
    Configuration menu
    Copy the full SHA
    6651c1b View commit details
    Browse the repository at this point in the history
  28. rename field

    yaahc committed Apr 15, 2020
    Configuration menu
    Copy the full SHA
    b3030e1 View commit details
    Browse the repository at this point in the history
  29. fmt

    yaahc committed Apr 15, 2020
    Configuration menu
    Copy the full SHA
    0397e46 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    664ad33 View commit details
    Browse the repository at this point in the history
  31. Apply suggestions from code review

    Co-Authored-By: Philipp Krones <hello@philkrones.com>
    yaahc and flip1995 committed Apr 15, 2020
    Configuration menu
    Copy the full SHA
    5cfb9ec View commit details
    Browse the repository at this point in the history
  32. Auto merge of rust-lang#5363 - yaahc:clippy-fix, r=phansch,flip1995

    add --fix support to `cargo-clippy`
    
    Prior to this we had started work on integrating clippy as a subcommand directly into cargo in the form of `cargo clippy-preview` and `cargo fix --clippy`. In the course of that work it was decided that the best approach would be to strictly add the features clippy needed to cargo in order to insert `clippy-driver` only for workspace crates. This was accomplished by adding a `RUSTC_WORKSPACE_WRAPPER` env variable to cargo that will override the normal `RUSTC_WRAPPER` when both are present and the current crate is a workspace crate.
    
    This change adds support to clippy to use this by setting the `RUSTC_WORKSPACE_WRAPPER` env variable instead `RUSTC_WRAPPER` and by detecting `--fix` as an arg and swapping out the `check` cargo command for `fix` when it is present.
    
    WIP, here are the current issues that I still need to resolve
    
    - [x] Detect if we're running on nightly rust
      - [x] Set `RUSTC_WORKSPACE_WRAPPER` on nightly, and `RUSTC_WRAPPER` on stable
      - [x] Error out on stable when `--fix` is specified, because stable currently hasn't landed the PR for `RUSTC_WORKSPACE_WRAPPER` so if we set this it just runs check and silently fails
    - [ ] Update the help text
      - [ ] The current plan is to shell out to `cargo check --help` and then postprocess the output to mention clippy instead of check where appropriate and to add the extra info about `--fix` and the `-- -A lint` options.
    - [x] tests?
    
    changelog: add `--fix` arg to `cargo-clippy`
    bors committed Apr 15, 2020
    Configuration menu
    Copy the full SHA
    1765c5d View commit details
    Browse the repository at this point in the history

Commits on Apr 16, 2020

  1. Configuration menu
    Copy the full SHA
    c20afbd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    72a8fc2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    014c415 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b5d6233 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7fb94c2 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d181fde View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#5478 - matthiaskrgr:apt_ci_debug_5477, r=phan…

    …sch,flip1995
    
     perform system upgrade fixes ci issue
    
    Perhaps doing a system upgrade magically solves the problem?
    
    changelog: none
    bors committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    da14f1e View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#5474 - phansch:reenable-rustfmt, r=flip1995

    Reenable rustfmt integration test
    
    changelog: none
    bors committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    3704954 View commit details
    Browse the repository at this point in the history
  9. Auto merge of rust-lang#5473 - Toxyxer:map-flatten-for-option, r=flip…

    …1995
    
    Map flatten for option
    
    Fixes rust-lang#5175
    
    changelog:
    - Trigger the map_flatten lint when map is called on an option
    - Add test for such case
    bors committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    c1c8bc6 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    65bc234 View commit details
    Browse the repository at this point in the history
  11. Auto merge of rust-lang#5475 - woshilapin:woshilapin-patch-1, r=flip1995

    [fix] Minor typo in GH Actions 'clippy_dev'
    
    changelog: minor: fixes file name in Github Actions workflow `clippy_dev.yml`
    
    I was looking for something else and ended up on that typo, just thought I would fix it.
    bors committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    2f6b6ab View commit details
    Browse the repository at this point in the history
  12. Auto merge of rust-lang#5476 - ThibsG:FixMatchesInExternalMacros, r=f…

    …lip1995
    
    Do not lint in macros for match lints
    
    Don't lint in macros for match lints, more precisely in `check_pat` and `check_local` where it was not the case.
    
    changelog: none
    
    fixes: rust-lang#5362
    bors committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    adf7c50 View commit details
    Browse the repository at this point in the history
  13. Auto merge of rust-lang#5479 - matthiaskrgr:readme_auto_fix, r=flip1995

    readme: update to cargo clippy --fix command
    
    changelog: none
    bors committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    eb9c15a View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2020

  1. Configuration menu
    Copy the full SHA
    162cf26 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#5480 - sinkuu:unit_arg_app, r=flip1995

    unit_arg suggestion is not really machine-applicable
    
    This lint suggests replacing any code returining `()`-type with `()` literal, which can change the behavior. e.g. `Ok(do_something())` -> `OK(())`.
    
    ---
    
    changelog: none
    bors committed Apr 17, 2020
    Configuration menu
    Copy the full SHA
    8ae143f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f58bb5b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    870ae36 View commit details
    Browse the repository at this point in the history
  5. cargo dev fmt

    phansch committed Apr 17, 2020
    Configuration menu
    Copy the full SHA
    eb7ad1c View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#5481 - sinkuu:no_as_ref, r=phansch

    question_mark: don't add `as_ref()` for a call expression
    
    If a call returns a `!Copy` value, it does so regardless of whether `as_ref()` is added. For example, `foo.into_option().as_ref()?` can be simplified to `foo.into_option()?`.
    
    ---
    
    changelog: Improved `question_mark` lint suggestion so that it doesn't add redundant `as_ref()`
    bors committed Apr 17, 2020
    Configuration menu
    Copy the full SHA
    82be9dc View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#5482 - phansch:diag, r=matthiaskrgr

    Cleanup: Rename 'db' variables to 'diag'
    
    Did the same in rustc a while ago: rust-lang#65428
    
    changelog: none
    bors committed Apr 17, 2020
    Configuration menu
    Copy the full SHA
    3ea8e5e View commit details
    Browse the repository at this point in the history
  8. Fix issue rust-lang#4892.

    logan-dev-oss committed Apr 17, 2020
    Configuration menu
    Copy the full SHA
    9c89cf0 View commit details
    Browse the repository at this point in the history
  9. Integrate more idiomatic rust changes.

    logan-dev-oss committed Apr 17, 2020
    Configuration menu
    Copy the full SHA
    66b855c View commit details
    Browse the repository at this point in the history
  10. add lint futures_not_send

    rkuhn committed Apr 17, 2020
    Configuration menu
    Copy the full SHA
    d2cbbff View commit details
    Browse the repository at this point in the history
  11. Auto merge of rust-lang#5445 - logan-dev-oss:master, r=flip1995

    Fixes issue rust-lang#4892.
    
    First contribution here 😊 ! Do not hesitate to correct me.
    
    This PR is related to issue rust-lang#4892 .
    
    # Summary
    
    ```rust
    -literal.method_call(args)
    ```
    The main idea is to not trigger `clippy::precedence` when the method call is an odd function.
    
    # Example
    
    ```rust
    // should trigger lint
    let _ = -1.0_f64.abs() //precedence of method call abs() and neg ('-') is ambiguous
    
    // should not trigger lint
    let _ = -1.0_f64.sin() // sin is an odd function => -sin(x) = sin(-x)
    ```
    
    # Theory
    
    Rust allows following literals:
    - char
    - string
    - integers
    - floats
    - byte
    - bool
    
    Only integers/floats implements the relevant `std::ops::Neg`.
    Following odd functions are implemented on i[8-128] and/or f[32-64]:
    - `asin`
    - `asinh`
    - `atan`
    - `atanh`
    - `cbrt`
    - `fract`
    - `round`
    - `signum`
    - `sin`
    - `sinh`
    - `tan`
    - `tanh `
    - `to_degrees`
    - `to_radians`
    
    # Implementation
    
    As suggested by `flip1995` in [comment](rust-lang/rust-clippy#4892 (comment)), this PR add a whitelist of odd functions and compare method call to the the whitelist before triggering lint.
    
    changelog: Don't trigger [`clippy::precedence`] on odd functions.
    bors committed Apr 17, 2020
    Configuration menu
    Copy the full SHA
    52dacbc View commit details
    Browse the repository at this point in the history
  12. Auto merge of rust-lang#5423 - rkuhn:add_futures_not_send, r=flip1995

    add lint futures_not_send
    
    changelog: add lint futures_not_send
    
    fixes rust-lang#5379
    
    ~Remark: one thing that can (should?) still be improved is to directly include the error message from the `Send` check so that the programmer stays in the flow. Currently, getting the actual error message requires a restructuring of the code to make the `Send` constraint explicit.~
    It now shows all unmet constraints for allowing the Future to be Send.
    bors committed Apr 17, 2020
    Configuration menu
    Copy the full SHA
    f1fb815 View commit details
    Browse the repository at this point in the history
  13. fix redundant_pattern_matching lint

    - now it handles `while let` case
    - better suggestions in `if let` case
    alex-700 committed Apr 17, 2020
    Configuration menu
    Copy the full SHA
    092c459 View commit details
    Browse the repository at this point in the history
  14. Auto merge of rust-lang#5483 - alex-700:fix-redundant-pattern-matchin…

    …g, r=flip1995
    
    fix redundant_pattern_matching lint
    
    - now it handles `while let` case  (related to rust-lang#5462)
    - better suggestions in `if let` case
    
    changelog: Fix suggestion in `redundant_pattern_matching` and also apply this lint to the `while let` case
    bors committed Apr 17, 2020
    Configuration menu
    Copy the full SHA
    1c0e4e5 View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2020

  1. Added basic lint and tests

    pmk21 committed Apr 18, 2020
    Configuration menu
    Copy the full SHA
    7c52e51 View commit details
    Browse the repository at this point in the history
  2. Added final lint and tests

    pmk21 committed Apr 18, 2020
    Configuration menu
    Copy the full SHA
    4d03b4d View commit details
    Browse the repository at this point in the history
  3. Polished lint and tests

    pmk21 committed Apr 18, 2020
    Configuration menu
    Copy the full SHA
    1c11035 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#5427 - pmk21:implicit-sat-sub, r=flip1995

    Add lint named implicit_saturating_sub
    
    Fixes: rust-lang#5399
    I've made a basic skeleton of the lint, would love more feedback on how to make it better.
    changelog: Add lint [`implicit_saturating_sub`]
    bors committed Apr 18, 2020
    Configuration menu
    Copy the full SHA
    891e1a8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    bdd32e7 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d03d3bd View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    cf4e353 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    d7f1a1e View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    86c6207 View commit details
    Browse the repository at this point in the history
  10. Auto merge of rust-lang#5486 - flip1995:badge_over, r=flip1995

    Remove badge FIXME from Cargo.toml
    
    cc rust-lang/crates.io#2436
    
    changelog: none
    bors committed Apr 18, 2020
    Configuration menu
    Copy the full SHA
    f6b07db View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2020

  1. Configuration menu
    Copy the full SHA
    502a66d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    554f47b View commit details
    Browse the repository at this point in the history
  3. Fix issue rust-lang#2907.

    Update the "borrow box" lint to avoid recommending the following
    conversion:
    
    ```
      // Old
      pub fn f(&mut Box<T>) {...}
    
      // New
      pub fn f(&mut T) {...}
    ```
    
    Given a mutable reference to a box, functions may want to change
    "which" object the Box is pointing at.
    
    This change avoids recommending removing the "Box" parameter
    for mutable references.
    smklein committed Apr 19, 2020
    Configuration menu
    Copy the full SHA
    0ef5dee View commit details
    Browse the repository at this point in the history
  4. Cleanup: node_id -> hir_id

    phansch committed Apr 19, 2020
    Configuration menu
    Copy the full SHA
    c3c00e5 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#5490 - sinkuu:toplevel_ref_arg_for, r=phansch

    Don't trigger toplevel_ref_arg for `for` loops
    
    The lint suggests turning `for ref x in 0..10 {` into `for ref x in let x = &0..10; {`.
    
    ---
    
    changelog: none
    bors committed Apr 19, 2020
    Configuration menu
    Copy the full SHA
    9273eab View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#5488 - phansch:future-not-send-ret-ty, r=flip…

    …1995
    
    Cleanup: future_not_send: use `utils::return_ty` function
    
    changelog: none
    bors committed Apr 19, 2020
    Configuration menu
    Copy the full SHA
    6ed2ae8 View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#5489 - phansch:node-id-hir-id, r=flip1995

    Cleanup: `node_id` -> `hir_id`
    
    This removes some more `node_id` terminology from Clippy and replaces one occurrence of `as_local_node_id` with `as_local_hir_id`, which should be doing the same for that particular case.
    
    changelog: none
    bors committed Apr 19, 2020
    Configuration menu
    Copy the full SHA
    e5fe56d View commit details
    Browse the repository at this point in the history
  8. Formatting and naming

    flip1995 committed Apr 19, 2020
    Configuration menu
    Copy the full SHA
    41115d9 View commit details
    Browse the repository at this point in the history
  9. Formatting and naming

    flip1995 committed Apr 19, 2020
    Configuration menu
    Copy the full SHA
    98a244f View commit details
    Browse the repository at this point in the history
  10. Auto merge of rust-lang#5491 - smklein:borrowed_box, r=flip1995

    Fix issue rust-lang#2907.
    
    Update the "borrow box" lint to avoid recommending the following
    conversion:
    
    ```
      // Old
      pub fn f(&mut Box<T>) {...}
    
      // New
      pub fn f(&mut T) {...}
    ```
    
    Given a mutable reference to a box, functions may want to change
    "which" object the Box is pointing at.
    
    This change avoids recommending removing the "Box" parameter
    for mutable references.
    
    changelog: Don't trigger [`borrow_box`] lint on `&mut Box` references
    bors committed Apr 19, 2020
    Configuration menu
    Copy the full SHA
    2efc2d6 View commit details
    Browse the repository at this point in the history
  11. Update empty_enum.stderr

    flip1995 committed Apr 19, 2020
    Configuration menu
    Copy the full SHA
    7aeb3a4 View commit details
    Browse the repository at this point in the history
  12. Auto merge of rust-lang#5141 - xiongmao86:issue5095, r=flip1995

    Fixes issue 5095
    
    fixes rust-lang#5095.
    
    - [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
    
    changelog: (internal) warn about collapsible `span_lint_and_then` calls.
    bors committed Apr 19, 2020
    Configuration menu
    Copy the full SHA
    6dcc8d5 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    00b4f28 View commit details
    Browse the repository at this point in the history

Commits on Apr 20, 2020

  1. Configuration menu
    Copy the full SHA
    001a42e View commit details
    Browse the repository at this point in the history
  2. creating suggestion

    DevinR528 committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    139e2c6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    40bbdff View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    51c2325 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    fca3537 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c6c77d9 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    930619b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    1ee04e4 View commit details
    Browse the repository at this point in the history
  9. dev update_lints

    DevinR528 committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    2e8a2de View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    7242fa5 View commit details
    Browse the repository at this point in the history
  11. cargo dev fmt

    DevinR528 committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    4cebe2b View commit details
    Browse the repository at this point in the history
  12. use if chain

    DevinR528 committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    ae82092 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    a9f1bb4 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    d1b1a4c View commit details
    Browse the repository at this point in the history
  15. Apply suggestions from PR review

    * Move the lint to pedantic
    * Import used types instead of prefixing with `hir::`
    ebroto committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    b7f85e8 View commit details
    Browse the repository at this point in the history
  16. Auto merge of rust-lang#5493 - ebroto:unsafe_derive_deserialize, r=fl…

    …ip1995
    
    Implement unsafe_derive_deserialize lint
    
    Added `unsafe_derive_deserialize` lint to check for cases when automatically deriving `serde::Deserialize` can be problematic, i.e. with types that have methods using `unsafe`.
    
    Closes rust-lang#5471
    
    changelog: Add lint [`unsafe_derive_deserialize`]
    bors committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    1336558 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    2141db8 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    489dd2e View commit details
    Browse the repository at this point in the history
  19. util/fetch_prs_between.sh: Add Markdown formatted Link

    This can then be easily copy/pasted into the changelog 💙
    phansch committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    90d8b63 View commit details
    Browse the repository at this point in the history
  20. update stderr file

    DevinR528 committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    3fbe321 View commit details
    Browse the repository at this point in the history
  21. Auto merge of rust-lang#5332 - DevinR528:if-let-else-mutex, r=flip1995

    If let else mutex
    
    changelog: Adds lint to catch incorrect use of `Mutex::lock` in `if let` expressions with lock calls in any of the blocks.
    
    closes: rust-lang#5219
    bors committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    6ce05bf View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    4e63faa View commit details
    Browse the repository at this point in the history
  23. remark fixes

    phansch committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    ca59ff2 View commit details
    Browse the repository at this point in the history
  24. Auto merge of rust-lang#5495 - phansch:update_changelog_docs, r=flip1995

    Update the changelog update documentation
    
    I just started working on updating the changelog. Hopefully the docs are a bit clearer now?
    
    r? @flip1995
    
    changelog: none
    bors committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    ef6ba82 View commit details
    Browse the repository at this point in the history
  25. Address review comments

    phansch committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    803670e View commit details
    Browse the repository at this point in the history
  26. Auto merge of rust-lang#5496 - phansch:markdown-link, r=flip1995

    util/fetch_prs_between.sh: Add Markdown formatted link
    
    This can then be easily copy/pasted into the changelog 💙
    
    changelog: none
    bors committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    6507728 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    7221db2 View commit details
    Browse the repository at this point in the history
  28. Auto merge of rust-lang#5499 - matthiaskrgr:crash_5497, r=flip1995

    fix crash on issue-69020-assoc-const-arith-overflow.rs
    
    Fixes rust-lang#5497
    
    changelog: fix crash on rustc test issue-69020-assoc-const-arith-overflow.rs
    bors committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    b3cb9b8 View commit details
    Browse the repository at this point in the history

Commits on Apr 21, 2020

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

Commits on Apr 22, 2020

  1. Lint for holding locks across await points

    Fixes rust-lang#4226
    
    This introduces the lint await_holding_lock. For async functions, we iterate
    over all types in generator_interior_types and look for types named MutexGuard,
    RwLockReadGuard, or RwLockWriteGuard. If we find one then we emit a lint.
    rokob committed Apr 22, 2020
    Configuration menu
    Copy the full SHA
    6c25c3c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2dc8c08 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    54e7f7e View commit details
    Browse the repository at this point in the history
  4. Make lint also capture blocks and closures, adjust language to mentio…

    …n other mutex types
    rokob committed Apr 22, 2020
    Configuration menu
    Copy the full SHA
    d6e55e9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8b052d3 View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#5439 - rokob:lock-await, r=Manishearth

    Lint for holding locks across await points
    
    Fixes rust-lang#4226
    
    This introduces the lint await_holding_lock. For async functions, we iterate
    over all types in generator_interior_types and look for types named MutexGuard,
    RwLockReadGuard, or RwLockWriteGuard. If we find one then we emit a lint.
    
    changelog: introduce the await_holding_lock lint
    bors committed Apr 22, 2020
    Configuration menu
    Copy the full SHA
    1d4dd3d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    14f596c View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f31502f View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2020

  1. Rustup "Remove BodyAndCache"

    tesuji committed Apr 23, 2020
    Configuration menu
    Copy the full SHA
    9ef9b79 View commit details
    Browse the repository at this point in the history
  2. predecessors_for will be removed soon

    Co-Authored-By: ecstatic-morse <ecstaticmorse@gmail.com>
    tesuji and ecstatic-morse committed Apr 23, 2020
    Configuration menu
    Copy the full SHA
    3f6f392 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#5508 - lzutao:rustup-71044, r=phansch

    Rustup "Remove `BodyAndCache`"
    
    cc rust-lang#71044
    changelog: none
    bors committed Apr 23, 2020
    Configuration menu
    Copy the full SHA
    d01a498 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d021d3e View commit details
    Browse the repository at this point in the history
  5. README: fix lit count line

    It looks like after changing to "there are more than 120 lints", an older PR was merged
    and resolving merge conflicts this was changed back to "there are 123 lints" causing the update-script to silently fail.
    
    Changed back the README.md back to the new format fixes the problem.
    matthiaskrgr committed Apr 23, 2020
    Configuration menu
    Copy the full SHA
    0816412 View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#5498 - phansch:update_changelog, r=flip1995

    Update CHANGELOG.md for Rust 1.43 and 1.44
    
    [Rendered](https://github.com/phansch/rust-clippy/blob/update_changelog/CHANGELOG.md)
    
    changelog: none
    bors committed Apr 23, 2020
    Configuration menu
    Copy the full SHA
    a609a9e View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    35ef280 View commit details
    Browse the repository at this point in the history
  8. Remove apt-get upgrade again

    flip1995 committed Apr 23, 2020
    Configuration menu
    Copy the full SHA
    0476e8b View commit details
    Browse the repository at this point in the history
  9. Auto merge of rust-lang#5513 - matthiaskrgr:reg, r=phansch

    fix clippy_dev exit status and make regex match again
    
    changelog: none
    
    Fixes rust-lang#5510
    
    r? @phansch
    bors committed Apr 23, 2020
    Configuration menu
    Copy the full SHA
    02c9435 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    4619bb2 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    c19ca0e View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    451bade View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    ef28361 View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2020

  1. rustup rust-lang#71215

    matthiaskrgr authored and flip1995 committed Apr 24, 2020
    Configuration menu
    Copy the full SHA
    f9c1acb View commit details
    Browse the repository at this point in the history
  2. Added lint match_vec_item

    CrazyRoka committed Apr 24, 2020
    Configuration menu
    Copy the full SHA
    96e2bc8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b0115fb View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2020

  1. Configuration menu
    Copy the full SHA
    63b451e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bf73d51 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fe25dbe View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    44511d5 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    dda1c8d View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#5520 - matthiaskrgr:rustup_44, r=flip1995,pha…

    …nsch
    
    rustup rust-lang#71215
    
    There's currently an crash in `ui/new_without_default.rs` that I need to figure out how to avoid.
    
    changelog: none
    bors committed Apr 25, 2020
    Configuration menu
    Copy the full SHA
    6ffe725 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    eadd9d2 View commit details
    Browse the repository at this point in the history
  8. Add tests for rust-lang#1654

    flip1995 committed Apr 25, 2020
    Configuration menu
    Copy the full SHA
    a182622 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#5408 - dtolnay:matchbool, r=flip1995

    Downgrade match_bool to pedantic
    
    I don't quite buy the justification in https://rust-lang.github.io/rust-clippy/. The justification is:
    
    > It makes the code less readable.
    
    In the Rust codebases I've worked in, I have found people were comfortable using `match bool` (selectively) to make code more readable. For example, initializing struct fields is a place where the indentation of `match` can work better than the indentation of `if`:
    
    ```rust
    let _ = Struct {
        v: {
            ...
        },
        w: match doing_w {
            true => ...,
            false => ...,
        },
        x: Nested {
            c: ...,
            b: ...,
            a: ...,
        },
        y: if doing_y {
            ...
        } else { // :(
            ...
        },
        z: ...,
    };
    ```
    
    Or sometimes people prefer something a bit less pithy than `if` when the meaning of the bool doesn't read off clearly from the condition:
    
    ```rust
    if set.insert(...) {
        ... // ???
    } else {
        ...
    }
    
    match set.insert(...) {
        // set.insert returns false if already present
        false => ...,
        true => ...,
    }
    ```
    
    Or `match` can be a better fit when the bool is playing the role more of a value than a branch condition:
    
    ```rust
    impl ErrorCodes {
        pub fn from(b: bool) -> Self {
            match b {
                true => ErrorCodes::Yes,
                false => ErrorCodes::No,
            }
        }
    }
    ```
    
    And then there's plain old it's-1-line-shorter, which means we get 25% more content on a screen when stacking a sequence of conditions:
    
    ```rust
    let old_noun = match old_binding.is_import() {
        true => "import",
        false => "definition",
    };
    let new_participle = match new_binding.is_import() {
        true => "imported",
        false => "defined",
    };
    ```
    
    Bottom line is I think this lint fits the bill better as a pedantic lint; I don't think linting on this by default is justified.
    
    changelog: Remove match_bool from default set of enabled lints
    flip1995 committed Apr 25, 2020
    Configuration menu
    Copy the full SHA
    e1d13c3 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#5505 - flip1995:avoid_running_lints, r=matt…

    …hiaskrgr
    
    Avoid running cargo+internal lints when not enabled
    
    r? @matthiaskrgr
    
    changelog: none
    flip1995 committed Apr 25, 2020
    Configuration menu
    Copy the full SHA
    a33d64a View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#5516 - flip1995:doc_release, r=phansch

    Add a note to the beta sections of release.md
    
    changelog: none
    flip1995 committed Apr 25, 2020
    Configuration menu
    Copy the full SHA
    e39550e View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#5517 - flip1995:deploy_time_travel, r=Manis…

    …hearth
    
    Deploy time travel
    
    Since not only commits to the master branch, but also tags and the beta branch are deployed, we have to be cautious which version of the deploy script is used. GHA always runs the workflow that is commited on the `ref`, that gets tested. For tagged commits. this is 6 weeks outdated workflows/scripts. To prevent this, this workflow first checks out the deploy.sh script, the website templates and all python scripts generating files for the website.
    
    changelog: none
    flip1995 committed Apr 25, 2020
    Configuration menu
    Copy the full SHA
    abbc618 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#5523 - phansch:add-new-ret-no-self-testcase…

    …, r=flip1995
    
    Add lifetime test case for `new_ret_no_self`
    
    cc rust-lang/rust-clippy#734 (comment)
    
    changelog: none
    flip1995 committed Apr 25, 2020
    Configuration menu
    Copy the full SHA
    9b882ba View commit details
    Browse the repository at this point in the history
  14. Auto merge of rust-lang#5527 - flip1995:rollup-pr2htfd, r=flip1995

    Rollup of 5 pull requests
    
    Successful merges:
    
     - rust-lang#5408 (Downgrade match_bool to pedantic)
     - rust-lang#5505 (Avoid running cargo+internal lints when not enabled)
     - rust-lang#5516 (Add a note to the beta sections of release.md)
     - rust-lang#5517 (Deploy time travel)
     - rust-lang#5523 (Add lifetime test case for `new_ret_no_self`)
    
    Failed merges:
    
    r? @ghost
    
    changelog: rollup
    bors committed Apr 25, 2020
    Configuration menu
    Copy the full SHA
    77c23b7 View commit details
    Browse the repository at this point in the history
  15. fix redundant_pattern_matching lint

    - now it gives correct suggestion in case of macros
    - better tests
    - remove a couple of non-relevant tests
    alex-700 committed Apr 25, 2020
    Configuration menu
    Copy the full SHA
    69fe6b4 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    806d973 View commit details
    Browse the repository at this point in the history
  17. Auto merge of rust-lang#5530 - ebroto:issue_5524, r=flip1995

    map_clone: avoid suggesting `copied()` for &mut
    
    changelog: map_clone: avoid suggesting `copied()` for &mut
    
    Fixes rust-lang#5524
    bors committed Apr 25, 2020
    Configuration menu
    Copy the full SHA
    a76bfd4 View commit details
    Browse the repository at this point in the history
  18. Auto merge of rust-lang#5525 - flip1995:issue_1654, r=phansch

     Don't trigger while_let_on_iterator when the iterator is recreated every iteration
    
    r? @phansch
    
    Fixes rust-lang#1654
    
    changelog: Fix false positive in [`while_let_on_iterator`]
    bors committed Apr 25, 2020
    Configuration menu
    Copy the full SHA
    44eb953 View commit details
    Browse the repository at this point in the history
  19. Auto merge of rust-lang#5511 - alex-700:fix-redundant-pattern-matchin…

    …g, r=flip1995
    
    Fix redundant_pattern_matching lint
    
    fixes rust-lang#5504
    
    changelog: Fix suggestion in `redundant_pattern_matching` for macros.
    bors committed Apr 25, 2020
    Configuration menu
    Copy the full SHA
    07dd5fa View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2020

  1. rustup to rust-lang#70043

    phansch committed Apr 26, 2020
    Configuration menu
    Copy the full SHA
    5b1622b View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#5533 - phansch:rustup001, r=matthiaskrgr

    rustup to rust-lang#70043
    
    changelog: none
    bors committed Apr 26, 2020
    Configuration menu
    Copy the full SHA
    b7c802b View commit details
    Browse the repository at this point in the history
  3. More diagnostic items

    In particular for:
    
    * `VecDeque`
    * `String`
    * `Mutex`
    * `HashMap`
    * `HashSet`
    
    cc rust-lang#71414 rust-lang/rust-clippy#5393
    phansch committed Apr 26, 2020
    Configuration menu
    Copy the full SHA
    0480ff8 View commit details
    Browse the repository at this point in the history
  4. cargo dev fmt

    phansch committed Apr 26, 2020
    Configuration menu
    Copy the full SHA
    0a49935 View commit details
    Browse the repository at this point in the history
  5. Remove util/dev script

    `cargo dev` has been the replacement for a while, so I think we can
    remove it now.
    
    cc rust-lang#5394
    phansch committed Apr 26, 2020
    Configuration menu
    Copy the full SHA
    8d596ea View commit details
    Browse the repository at this point in the history
  6. Fix cargo crash

    phansch committed Apr 26, 2020
    Configuration menu
    Copy the full SHA
    eda73fe View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#5509 - phansch:more-diagnostic-items2, r=matt…

    …hiaskrgr
    
    Use more diagnostic items
    
    In particular for:
    
    * `VecDeque`
    * `String`
    * `Mutex`
    * `HashMap`
    * `HashSet`
    
    cc rust-lang#71414 rust-lang#5393
    
    ---
    
    changelog: none
    bors committed Apr 26, 2020
    Configuration menu
    Copy the full SHA
    5c12f2b View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#5534 - phansch:remove-util-dev, r=flip1995

    Remove util/dev script
    
    `cargo dev` has been the replacement for a while, so I think we can
    remove it now.
    
    cc rust-lang#5394
    
    changelog: none
    bors committed Apr 26, 2020
    Configuration menu
    Copy the full SHA
    87a6f3f View commit details
    Browse the repository at this point in the history
  9. Small lint update

    - Changed lint category to `correctness`
    - Moved main function to bottom in test file
    - Added `FIXME` comment to `span_lint_and_sugg` to improve later
    CrazyRoka committed Apr 26, 2020
    Configuration menu
    Copy the full SHA
    940c662 View commit details
    Browse the repository at this point in the history
  10. Updated lint info in lib.rs

    CrazyRoka committed Apr 26, 2020
    Configuration menu
    Copy the full SHA
    b574941 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    149f6d6 View commit details
    Browse the repository at this point in the history
  12. Apply suggestions from PR review

    - Show just one error message with multiple suggestions in case of
      using multiple times an OS in target family position
    - Only suggest #[cfg(unix)] when the OS is in the Unix family
    - Test all the operating systems
    ebroto committed Apr 26, 2020
    Configuration menu
    Copy the full SHA
    d24a106 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    ce50e42 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    4a405c9 View commit details
    Browse the repository at this point in the history
  15. Split tests in unix/non-unix

    ebroto committed Apr 26, 2020
    Configuration menu
    Copy the full SHA
    303e7d1 View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2020

  1. Auto merge of rust-lang#5506 - ebroto:mismatched_target_os, r=flip1995

    Implement mismatched_target_os lint
    
    I've extended the check suggested in the issue to all the currently supported operating systems instead of limiting it to `linux` and `macos`, let me know if we want to do this.
    
    Also, I've restored the text `There are over XXX lints ...` in the README as it was matched against by `cargo dev new_lint`.
    
    changelog: Added `mismatched_target_os` lint to warn when an operating system is used in target family position in a #[cfg] attribute
    
    Closes rust-lang#3949
    bors committed Apr 27, 2020
    Configuration menu
    Copy the full SHA
    5d8a3e8 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#5522 - CrazyRoka:match_vec_item, r=phansch

    New  lint `match_vec_item`
    
    Added new lint to warn a match on index item which can panic. It's always better to use `get(..)` instead.
    Closes rust-lang#5500
    changelog: New lint `match_on_vec_items`
    bors committed Apr 27, 2020
    Configuration menu
    Copy the full SHA
    d13ffbe View commit details
    Browse the repository at this point in the history
  3. rustup: rust-lang#71628

    csmoe committed Apr 27, 2020
    Configuration menu
    Copy the full SHA
    305177d View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#5538 - csmoe:rustup, r=phansch

    rustup: rust-lang#71628
    
    cc rust-lang#71608
    
    changelog: none
    bors committed Apr 27, 2020
    Configuration menu
    Copy the full SHA
    f2486b3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3a96f54 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    fc5fc63 View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2020

  1. Auto merge of rust-lang#5535 - ebroto:issue_5360, r=phansch

    used_underscore_binding: do not lint on `await` desugaring
    
    changelog: used_underscore_binding: do not lint on `await` desugaring
    
    Fixes rust-lang#5360
    bors committed Apr 28, 2020
    Configuration menu
    Copy the full SHA
    2c4d566 View commit details
    Browse the repository at this point in the history
  2. rustup rust-lang#71292

    matthiaskrgr committed Apr 28, 2020
    Configuration menu
    Copy the full SHA
    bdc9528 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9a3b0a0 View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2020

  1. Rustup to rust-lang#71518

    flip1995 committed Apr 29, 2020
    Configuration menu
    Copy the full SHA
    cd34809 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#5545 - flip1995:rustup, r=flip1995

    Rustup to rust-lang#71518
    
    changelog: none
    bors committed Apr 29, 2020
    Configuration menu
    Copy the full SHA
    28197b6 View commit details
    Browse the repository at this point in the history
  3. Fixed incorrect suggestion of clone_double_ref lint

    - Added `<_>` to suggestion
    - Changed help message
    CrazyRoka committed Apr 29, 2020
    Configuration menu
    Copy the full SHA
    20c069b View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#5547 - CrazyRoka:fix-clone-double-ref-suggest…

    …ion, r=flip1995
    
    Fixed incorrect suggestion of `clone_double_ref` lint
    
    - Added `<_>` to suggestion
    - Changed help message
    - Added new tests
    Closes rust-lang#5494
    
    changelog: Improve suggestion of [`clone_double_ref`]
    bors committed Apr 29, 2020
    Configuration menu
    Copy the full SHA
    0a53ed2 View commit details
    Browse the repository at this point in the history

Commits on Apr 30, 2020

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

Commits on May 1, 2020

  1. Auto merge of rust-lang#5548 - matthiaskrgr:traget_os, r=flip1995

    mismatched_target_os: link to respective section in rust reference
    
    changelog: none
    bors committed May 1, 2020
    Configuration menu
    Copy the full SHA
    d270887 View commit details
    Browse the repository at this point in the history

Commits on May 2, 2020

  1. Gate on clippy on CI

    oli-obk committed May 2, 2020
    Configuration menu
    Copy the full SHA
    a182450 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1ef5a93 View commit details
    Browse the repository at this point in the history
  3. Delete the clippy submodule

    oli-obk committed May 2, 2020
    Configuration menu
    Copy the full SHA
    06c4481 View commit details
    Browse the repository at this point in the history
  4. Add 'src/tools/clippy/' from commit 'd2708873ef711ec8ab45df1e984ecf24…

    …a96cd369'
    
    git-subtree-dir: src/tools/clippy
    git-subtree-mainline: 06c4481
    git-subtree-split: d270887
    oli-obk committed May 2, 2020
    Configuration menu
    Copy the full SHA
    bce9fae View commit details
    Browse the repository at this point in the history