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 6 pull requests #84517

Closed
wants to merge 133 commits into from
Closed

Commits on Mar 28, 2021

  1. Configuration menu
    Copy the full SHA
    1768efa View commit details
    Browse the repository at this point in the history
  2. Take into account sub modules

    ThibsG committed Mar 28, 2021
    Configuration menu
    Copy the full SHA
    6985d13 View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2021

  1. Fix macro_use_import ICE

    Jarcho committed Apr 3, 2021
    Configuration menu
    Copy the full SHA
    c05760f View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2021

  1. Check path imports per module

    ThibsG committed Apr 4, 2021
    Configuration menu
    Copy the full SHA
    81dfb9e View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2021

  1. tabs_in_doc_comments: Fix ICE due to char indexing

    This is a quick-fix for an ICE in `tabs_in_doc_comments`. The problem
    was that we we're indexing into possibly multi-byte characters, such as '位'.
    
    More specifically `get_chunks_of_tabs` was returning indices into
    multi-byte characters. Those were passed on to a `Span` creation that
    then caused the ICE.
    
    This fix makes sure that we don't return indices that point inside a
    multi-byte character. *However*, we are still iterating over unicode
    codepoints, not grapheme clusters. So a seemingly single character like y̆ ,
    which actually consists of two codepoints, will probably still cause
    incorrect spans in the output.
    phansch committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    1573d10 View commit details
    Browse the repository at this point in the history
  2. Fix explicit_into_iter_loop

    Only lint when `into_iter` is an implementation of `IntoIterator`
    Minor cleanups
    Jarcho committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    6b5778e View commit details
    Browse the repository at this point in the history
  3. Introduce is_lang_ctor

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

Commits on Apr 8, 2021

  1. Configuration menu
    Copy the full SHA
    f6d1f36 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#7022 - Jarcho:macro_use_import_ice, r=flip1995

    Fix `macro_use_import` ICE
    
    fixes: rust-lang#7015
    changelog: Fix `macro_use_import` ICE
    bors committed Apr 8, 2021
    Configuration menu
    Copy the full SHA
    c40fa00 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4f7fc11 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#7023 - boxdot:invalid-null-usage-v2, r=camste…

    …ffen
    
    Invalid null usage v2
    
    This is continuation of rust-lang#6192 after inactivity.
    
    I plan to move paths into the compiler as diagnostic items after this is merged.
    
    fixes rust-lang#1703
    changelog: none
    bors committed Apr 8, 2021
    Configuration menu
    Copy the full SHA
    75efc14 View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2021

  1. Use register_renamed instead of register_removed for uplifted lints

    This still applies the lint, and also adds a structured suggestion to
    rename it.
    jyn514 committed Apr 9, 2021
    Configuration menu
    Copy the full SHA
    012f9d4 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#7056 - jyn514:register-renamed, r=flip1995

    Use `register_renamed` instead of `register_removed` for uplifted lints
    
    This still applies the lint, and also adds a structured suggestion to
    rename it.
    
    changelog: Use `register_renamed` instead of `register_removed` for lints uplifted to rustc
    bors committed Apr 9, 2021
    Configuration menu
    Copy the full SHA
    f7c2c44 View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2021

  1. Configuration menu
    Copy the full SHA
    297e84f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dde46c9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8b9331b View commit details
    Browse the repository at this point in the history
  4. Fix dogfood

    phansch committed Apr 10, 2021
    Configuration menu
    Copy the full SHA
    47a4865 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    43e6c65 View commit details
    Browse the repository at this point in the history
  6. Fix rustfmt

    daxpedda committed Apr 10, 2021
    Configuration menu
    Copy the full SHA
    8f4417f View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    271c163 View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#7060 - daxpedda:debug-assert-panic-in-result-…

    …fn, r=flip1995
    
    Remove `debug_assert` from `panic_in_result_fn`
    
    I couldn't find any documentation on `debug_assert` that should be remove.
    In my humble opinion, I would also like to argue that `todo` and `unreachable` shouldn't trigger this lint?
    
    Related: rust-lang/rust-clippy#6082
    
    r? `@flip1995`
    
    changelog: Change `panic_in_result_fn` to ignore `debug_assert` and co macros
    bors committed Apr 10, 2021
    Configuration menu
    Copy the full SHA
    fd5cf4e View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    cb14e7e View commit details
    Browse the repository at this point in the history
  10. Deprecate filter_map

    camsteffen committed Apr 10, 2021
    Configuration menu
    Copy the full SHA
    a45faf6 View commit details
    Browse the repository at this point in the history
  11. Auto merge of rust-lang#7063 - daxpedda:debug-assert-panic, r=Manishe…

    …arth
    
    Fix false-positive `debug_assert` in `panic`
    
    This fixes a false-positive in `clippy::panic` when `debug_assert` is used with a message.
    
    Fixes rust-lang/rust-clippy#7062.
    
    changelog: Fix false-positive in `panic` when `debug_assert` is used with a message
    bors committed Apr 10, 2021
    Configuration menu
    Copy the full SHA
    75e20ba View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2021

  1. Configuration menu
    Copy the full SHA
    3ce6f0d View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#6905 - ThibsG:fpSingleComponentPathImports521…

    …0, r=giraffate
    
    Fix FP in `single_component_path_imports` lint
    
    Fix FP in  `single_component_path_imports` lint when the import is reused with `self`, like in `use self::module`.
    
    Fixes rust-lang#5210
    
    changelog: none
    bors committed Apr 11, 2021
    Configuration menu
    Copy the full SHA
    67fad01 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#7059 - camsteffen:filter-map, r=flip1995

    Deprecate `filter_map`
    
    Since rust-lang#6591, `filter_map` does not even lint `filter().map()`. The cases that are still linted make no sense IMO. So this just removes/deprecates it.
    
    changelog: Deprecate `filter_map` lint
    
    Closes rust-lang#3424
    Fixes rust-lang#7050
    bors committed Apr 11, 2021
    Configuration menu
    Copy the full SHA
    a6b514c View commit details
    Browse the repository at this point in the history

Commits on Apr 12, 2021

  1. Configuration menu
    Copy the full SHA
    fb54b70 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#7065 - rail-rain:warn_copy_pass_by_ref, r=Man…

    …ishearth
    
    Add a note on the issue rust-lang#5953
    
    Hello,
    
    I thought it would be better to have a note and warning about this issue considering it introduced an UB in the past even with the "Search on Github" feature.
    
    ---
    
    changelog: Add a note on the issue rust-lang#5953 to the known problems section.
    bors committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    f0ceb28 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#7047 - camsteffen:lang-ctor, r=flip1995

    Introduce `is_lang_ctor`
    
    changelog: none
    
    Replaces `is_some_ctor` and `is_ok_ctor`. Removes many path usages.
    bors committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    aecccbc View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#6982 - Jarcho:explicit_into_iter_loop_fp, r=f…

    …lip1995
    
    Fix `explicit_into_iter_loop`
    
    fixes: rust-lang#6900
    
    changelog: Only lint when `into_iter` is an implementation of `IntoIterator`
    bors committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    c3ef585 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    53260df View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0218a3b View commit details
    Browse the repository at this point in the history
  7. fix limit_stderr_length error

    TaKO8Ki committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    e6c67ad View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#7064 - ThibsG:WrongSelfFix, r=giraffate

    Fix FP in `wrong_self_convention` lint
    
    Previously, this lint didn't check into impl block when it was implementing a trait.
    Recent improvements (rust-lang#6924) have moved this check and some impl blocks are now checked but they shouldn't, such as in rust-lang#7032.
    
    Fixes rust-lang#7032
    
    changelog: Fix FP when not taking `self` in impl block for `wrong_self_convention` lint
    bors committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    411c0df View commit details
    Browse the repository at this point in the history
  9. Remove paths::STD_PTR_NULL

    boxdot committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    d6beb18 View commit details
    Browse the repository at this point in the history
  10. Auto merge of rust-lang#7067 - TaKO8Ki:fix-false-negative-on-needless…

    …-return, r=llogiq
    
    Fix a false negative on `needless return`
    
    closes rust-lang#7042
    
    changelog: fix a false negative on `needless return`
    bors committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    2a96bc4 View commit details
    Browse the repository at this point in the history
  11. Auto merge of rust-lang#7068 - boxdot:remove-std-ptr-null, r=camsteffen

    Remove paths::STD_PTR_NULL
    
    Related to rust-lang#5393
    
    changelog: none
    bors committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    e9728b8 View commit details
    Browse the repository at this point in the history

Commits on Apr 13, 2021

  1. Configuration menu
    Copy the full SHA
    76bd5d2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0d14429 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#7074 - camsteffen:diag-methods, r=llogiq

    Split `is_diagnostic_assoc_item`
    
    changelog: none
    
    * Split `is_diagnostic_assoc_item` into `is_diag_item_method` and `is_diag_trait_item`
      * `is_diag_item_method` is a bit more nuanced with the `tcx.type_of(impl_id).ty_adt_def()` step, so it seems better to keep that separate.
      * No need to generalize over traits and Adt's since we know which one we want at compile time
      * "item" vs. "method" because a trait may have associated items.
    * Replaces the usage of the `sym::slice` diagnostic item with the `slice_alloc` lang item. The diagnostic item should be removed from rustc because it is on the `slice_alloc` impl, not slice itself (and it's not needed).
    bors committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    8f3c245 View commit details
    Browse the repository at this point in the history
  4. Fix a FP in missing_const_for_fn

    where a function that calls a standard library function whose constness
    is unstable is considered as being able to be a const function
    rail-rain committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    26a1989 View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2021

  1. Configuration menu
    Copy the full SHA
    cbdebd9 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#7076 - rail-rain:missing_const_for_fn, r=phansch

    Fix a FP in `missing_const_for_fn`
    
    where a function that calls a standard library function whose constness
    is unstable is considered as being able to be a const function. Fixes rust-lang#5995.
    
    The core change is the move from `rustc_mir::const_eval::is_min_const_fn` to `rustc_mir::const_eval::is_const_fn`. I'm not clear about the difference in their purpose between them so I'm not sure if it's acceptable to call `qualify_min_const_fn::is_min_const_fn` this way now.
    
    ---
    
    changelog: `missing_const_for_fn`: No longer lints when an unstably const function is called
    bors committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    19740d9 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#7039 - phansch:melt-ice, r=flip1995

    tabs_in_doc_comments: Fix ICE due to char indexing
    
    This is a quick-fix for an ICE in `tabs_in_doc_comments`. The problem
    was that we we're indexing into possibly multi-byte characters, such as '位'.
    
    More specifically `get_chunks_of_tabs` was returning indices into
    multi-byte characters. Those were passed on to a `Span` creation that
    then caused the ICE.
    
    This fix makes sure that we don't return indices that point inside a
    multi-byte character. *However*, we are still iterating over unicode
    codepoints, not grapheme clusters. So a seemingly single character like y̆ ,
    which actually consists of two codepoints, will probably still cause
    incorrect spans in the output. But I don't think we handle those cases
    anywhere in Clippy currently?
    
    Fixes rust-lang#5835
    
    changelog: Fix ICE in `tabs_in_doc_comments`
    bors committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    24921df View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#7070 - camsteffen:changelog-stderr, r=flip1995

    Fix changelog check output
    
    Error messages are more helpful if you can see them.
    
    changelog: none
    bors committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    b1c675f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    cbde4f2 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7e90bb6 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    2992b19 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    0b4af72 View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2021

  1. Improve map_entry lint

    Fix false positives where the map is used before inserting into the map.
    Fix false positives where two insertions happen.
    Suggest using `if let Entry::Vacant(e) = _.entry(_)` when `or_insert` might be a semantic change
    Jarcho committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    ce5e927 View commit details
    Browse the repository at this point in the history
  2. map_entry improvements

    Lint `if _.[!]contains_key(&_) { .. } else { .. }` so long as one of the branches contains an insertion.
    Jarcho committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    b63a5b5 View commit details
    Browse the repository at this point in the history
  3. map_entry improvements

    Suggest using `or_insert_with` when possible
    Jarcho committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    3323ff7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    bcf3488 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    779d98f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    014bf43 View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#7090 - camsteffen:pre-expansion-note, r=Manis…

    …hearth
    
    Add a note for pre-expansion passes
    
    changelog: none
    
    Just had to turn away a PR for using pre-expansion. I don't think that was the first time. So hopefully this will inform people sooner.
    
    r? flip1995
    bors committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    52c8c9c View commit details
    Browse the repository at this point in the history
  8. Remove all usages of match_path, match_qpath and match_path_ast

    … except the `author` lint.
    
    Add note to fix `MATCH_TYPE_ON_DIAG_ITEM`
    Add false negative test for `uninit_assumed_init`
    Jarcho committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    f6c5d8d View commit details
    Browse the repository at this point in the history
  9. Auto merge of rust-lang#7049 - Jarcho:remove_match_path, r=camsteffen

    Remove `match_path` and `match_qpath`
    
    The only remaining usage is the `author` lint, so the functions are left in for now. The test result for `repl_uninit` changed, the lint was broken before.
    
    The `collapsible_span_lint_calls` and `match_type_on_diag_item` tests have been changed. Both lints were broken when utils was extracted into it's own crate. `match_type_on_diag_item` isn't quite fixed, but it's at least less broken.
    
    changelog: None
    bors committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    586a993 View commit details
    Browse the repository at this point in the history

Commits on Apr 16, 2021

  1. Improve redundant_pattern_matching

    Add a note when the drop order change may result in different behaviour.
    Jarcho committed Apr 16, 2021
    Configuration menu
    Copy the full SHA
    b658163 View commit details
    Browse the repository at this point in the history
  2. redundant_pattern_matching fix inverted boolean when missing Drop

    … trait # Please enter the commit message for your changes. Lines starting
    # with '#' will be ignored, and an empty message aborts the commit.
    #
    # Date: Fri Apr 2 19:04:45 2021 -0400
    #
    # On branch redundant_pattern_matching
    # Your branch is ahead of 'origin/redundant_pattern_matching' by 1 commit.
    # (use "git push" to publish your local commits)
    #
    # Changes to be committed:
    #	modified: clippy_lints/src/matches.rs
    # # Please enter the commit message for your changes. Lines starting
    # with '#' will be ignored, and an empty message aborts the commit.
    #
    # Date: Fri Apr 2 19:04:45 2021 -0400
    #
    # interactive rebase in progress; onto ebc64690d
    # Last commands done (6 commands done):
    # pick 25d211ad8 Code cleanup and additional std types checked
    # r 0c71ce56f `redundant_pattern_matching` fix inverted boolean when missing `Drop` trait
    # No commands remaining.
    # You are currently editing a commit while rebasing branch 'redundant_pattern_matching' on 'ebc64690d'.
    #
    # Changes to be committed:
    #	modified: clippy_lints/src/matches.rs
    #
    Jarcho committed Apr 16, 2021
    Configuration menu
    Copy the full SHA
    c02baba View commit details
    Browse the repository at this point in the history
  3. Fix single_match

    Check for `PartialEq` in addition to `StructuralPartialEq` before suggesting `==`
    Jarcho committed Apr 16, 2021
    Configuration menu
    Copy the full SHA
    9a55c0c View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#7085 - Jarcho:manual_map_autoderef, r=giraffate

    Don't allow adjustments for `manual_map`
    
    fixes: rust-lang#7077
    
    The other option here would be to add the return type to the closure. It would be fine for simple types, but longer types can be rather unwieldy. Could also implement the adjustment manually.
    
    changelog: Don't lint `manual_map` when type adjustments are added. e.g. autoderef
    bors committed Apr 16, 2021
    Configuration menu
    Copy the full SHA
    faa9756 View commit details
    Browse the repository at this point in the history
  5. Remove #[main] attribute.

    crlf0710 committed Apr 16, 2021
    Configuration menu
    Copy the full SHA
    696562d View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#7093 - Jarcho:single_match_fp, r=llogiq

    Fix `single_match`
    
    fixes: rust-lang#7038
    changelog: Don't suggest an equality check for types which don't implement `PartialEq` in `single_match`
    bors committed Apr 16, 2021
    Configuration menu
    Copy the full SHA
    ddc2598 View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#6937 - Jarcho:map_entry_suggestion, r=giraffate

    Improve `map_entry` suggestion
    
    fixes: rust-lang#5176
    fixes: rust-lang#4674
    fixes: rust-lang#4664
    fixes: rust-lang#1450
    
    Still need to handle the value returned by `insert` correctly.
    
    changelog: Improve `map_entry` suggestion. Will now suggest `or_insert`, `insert_with` or `match _.entry(_)` as appopriate.
    changelog: Fix `map_entry` false positives where the entry api can't be used. e.g. when the map is used for multiple things.
    bors committed Apr 16, 2021
    Configuration menu
    Copy the full SHA
    1e0a3ff View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    61230f4 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    0462666 View commit details
    Browse the repository at this point in the history
  10. Eat dogfood

    camsteffen committed Apr 16, 2021
    Configuration menu
    Copy the full SHA
    b049c88 View commit details
    Browse the repository at this point in the history
  11. Auto merge of rust-lang#6568 - Jarcho:redundant_pattern_matching, r=f…

    …lip1995
    
    Fix: redundant_pattern_matching drop order
    
    Fixes rust-lang#5746
    
    A note about the change in drop order is added when the scrutinee (or any temporary in the expression) isn't known to be safe to drop in any order (i.e. doesn't implement the `Drop` trait, or contain such a type). There is a whitelist for some `std` types, but it's incomplete. Currently just `Vec<_>`, `Box<_>`, `Rc<_>` and `Arc<_>`, but only if the contained type is also safe to drop in any order.
    
    Another lint for when the drop order changes could be added as allowed by default, but the drop order requirement is pretty subtle in this case. I think the note added to the lint should be enough to make someone think before applying the change.
    
    changelog: Added a note to `redundant_pattern_matching` when the change in drop order might matter
    bors committed Apr 16, 2021
    Configuration menu
    Copy the full SHA
    7f2068c View commit details
    Browse the repository at this point in the history
  12. Auto merge of rust-lang#7098 - camsteffen:cloned-copied, r=Manishearth

    Add `cloned_instead_of_copied` lint
    
    Don't go cloning all willy-nilly.
    
    Featuring a new `get_iterator_item_ty` util!
    
    changelog: Add cloned_instead_of_copied lint
    
    Closes rust-lang#3870
    bors committed Apr 16, 2021
    Configuration menu
    Copy the full SHA
    28dbcd8 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    2d050f4 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    ccd0f0b View commit details
    Browse the repository at this point in the history
  15. Auto merge of rust-lang#7075 - xFrednet:7054-fp-branches-sharing-code…

    …, r=camsteffen,flip1995
    
    Fixing FPs for the `branches_sharing_code` lint
    
    Fixes rust-lang#7053
    Fixes rust-lang#7054
    And an additional CSS adjustment to support dark mode for every inline code. It currently only works in paragraphs, which was an oversight on my part 😅. [Current Example](https://rust-lang.github.io/rust-clippy/master/index.html#blacklisted_name)
    
    This also includes ~50 lines of doc comments and is therefor not as big as the changes would indicate. 🐧
    
    ---
    
    changelog: none
    
    All of these bugs were introduced in this dev version and are therefor not worth a change log entry.
    
    r? `@phansch`
    cc: `@camsteffen` since you have a pretty good overview of the `SpanlessEq` implementation 🙃
    bors committed Apr 16, 2021
    Configuration menu
    Copy the full SHA
    eaf0f3d View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    559dedd View commit details
    Browse the repository at this point in the history
  17. Auto merge of rust-lang#7087 - Jarcho:allman_style_else, r=camsteffen

    Allow allman style braces in `suspicious_else_formatting`
    
    fixes: rust-lang#3864
    
    Indentation checks could be added as well, but the lint already doesn't check for it.
    
    changelog: Allow allman style braces in `suspicious_else_formatting`
    bors committed Apr 16, 2021
    Configuration menu
    Copy the full SHA
    831c157 View commit details
    Browse the repository at this point in the history
  18. Add flat_map_option lint

    camsteffen committed Apr 16, 2021
    Configuration menu
    Copy the full SHA
    5af078a View commit details
    Browse the repository at this point in the history
  19. Auto merge of rust-lang#7099 - ABouttefeux:master, r=llogiq

    add type in help message of from_over_into
    
    fixes rust-lang#7088
    changelog: add type in help message of from_over_into
    bors committed Apr 16, 2021
    Configuration menu
    Copy the full SHA
    e441b33 View commit details
    Browse the repository at this point in the history
  20. Switch transmute_ptr_to_ptr to "pedantic" class.

    Per discussion in rust-lang/rust-clippy#6372, this lint has significant false positives.
    taralx committed Apr 16, 2021
    Configuration menu
    Copy the full SHA
    8b5faf4 View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2021

  1. Do not ignore path segments in the middle in #[allow]/#[warn]/`#[…

    …deny]`/`#[forbid]` attributes
    hyd-dev committed Apr 17, 2021
    Configuration menu
    Copy the full SHA
    9137803 View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2021

  1. Auto merge of rust-lang#84064 - hyd-dev:unknown-lints, r=petrochenkov

    Do not ignore path segments in the middle in `#[allow]`/`#[warn]`/`#[deny]`/`#[forbid]` attributes
    
    Fixes rust-lang#83477.
    bors committed Apr 18, 2021
    Configuration menu
    Copy the full SHA
    8c37e19 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    024a49a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fdad6ab View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    fbfaab2 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#78880 - CDirkx:not_supported, r=joshtriplett

    Add `Unsupported` to `std::io::ErrorKind`
    
    I noticed a significant portion of the uses of `ErrorKind::Other` in std is for unsupported operations.
    The notion that a specific operation is not available on a target (and will thus never succeed) seems semantically distinct enough from just "an unspecified error occurred", which is why I am proposing to add the variant `Unsupported` to `std::io::ErrorKind`.
    
    **Implementation**:
    
    The following variant will be added to `std::io::ErrorKind`:
    
    ```rust
    /// This operation is unsupported on this platform.
    Unsupported
    ```
    `std::io::ErrorKind::Unsupported` is an error returned when a given operation is not supported on a platform, and will thus never succeed; there is no way for the software to recover. It will be used instead of `Other` where appropriate, e.g. on wasm for file and network operations.
    
    `decode_error_kind` will be updated  to decode operating system errors to `Unsupported`:
    - Unix and VxWorks: `libc::ENOSYS`
    - Windows: `c::ERROR_CALL_NOT_IMPLEMENTED`
    - WASI: `wasi::ERRNO_NOSYS`
    
    **Stability**:
    This changes the kind of error returned by some functions on some platforms, which I think is not covered by the stability guarantees of the std? User code could depend on this behavior, expecting `ErrorKind::Other`, however the docs already mention:
    
    > Errors that are `Other` now may move to a different or a new `ErrorKind` variant in the future. It is not recommended to match an error against `Other` and to expect any additional characteristics, e.g., a specific `Error::raw_os_error` return value.
    
    The most recent variant added to `ErrorKind` was `UnexpectedEof` in `1.6.0` (almost 5 years ago), but `ErrorKind` is marked as `#[non_exhaustive]` and the docs warn about exhaustively matching on it, so adding a new variant per se should not be a breaking change.
    
    The variant `Unsupported` itself could be marked as `#[unstable]`, however, because this PR also immediately uses this new variant and changes the errors returned by functions I'm inclined to agree with the others in this thread that the variant should be insta-stabilized.
    bors committed Apr 18, 2021
    Configuration menu
    Copy the full SHA
    392d549 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    bd95569 View commit details
    Browse the repository at this point in the history
  7. un-double return on try_err

    llogiq committed Apr 18, 2021
    Configuration menu
    Copy the full SHA
    243dc46 View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#7108 - rust-lang:fix-return-try-err, r=Manish…

    …earth
    
    un-double `return` on try_err
    
    This fixes rust-lang#7103 by looking at the parent expression and omitting the "return " in the suggestion when its already a `return` expression.
    
    ---
    
    changelog: none
    bors committed Apr 18, 2021
    Configuration menu
    Copy the full SHA
    c569d33 View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2021

  1. Configuration menu
    Copy the full SHA
    04db4ab View commit details
    Browse the repository at this point in the history
  2. remove E0723 error code

    RalfJung committed Apr 19, 2021
    Configuration menu
    Copy the full SHA
    46d09f7 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#7101 - camsteffen:flat-map-option, r=giraffate

    Add flat_map_option lint
    
    changelog: Add flat_map_option lint
    
    Closes rust-lang#2241
    bors committed Apr 19, 2021
    Configuration menu
    Copy the full SHA
    fe5cefc View commit details
    Browse the repository at this point in the history
  4. Fix links in doc

    giraffate committed Apr 19, 2021
    Configuration menu
    Copy the full SHA
    b20cbff View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2d65b2d View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#7112 - giraffate:update_pull_request_template…

    …, r=camsteffen
    
    Update pull request template
    
    A follow-up of <rust-lang/rust-clippy#7064 (comment)>.
    
    changelog: none
    bors committed Apr 19, 2021
    Configuration menu
    Copy the full SHA
    a3b1efd View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c6b381c View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    42d0702 View commit details
    Browse the repository at this point in the history
  9. Auto merge of rust-lang#7111 - giraffate:fix_link_in_doc, r=Manishearth

    Fix links in doc
    
    changelog: none
    bors committed Apr 19, 2021
    Configuration menu
    Copy the full SHA
    8f77e20 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    419bf6b View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    e2e104b View commit details
    Browse the repository at this point in the history
  12. Auto merge of rust-lang#7092 - basavesh:fix#7066, r=giraffate

    useless use of format! should return function directly
    
    fixes rust-lang#7066
    
    changelog: [`useless_format`] wraps the content in the braces when it's needed.
    
    r? `@giraffate`
    bors committed Apr 19, 2021
    Configuration menu
    Copy the full SHA
    b7c12f3 View commit details
    Browse the repository at this point in the history

Commits on Apr 20, 2021

  1. Configuration menu
    Copy the full SHA
    6eae905 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#7097 - yawara:fix/7069, r=llogiq

    Fixed inconsistent_struct_constructor triggers in macro-generated code
    
    fixes rust-lang#7069
    
    changelog: `inconsistent_struct_constructor`: Fix FP in macro expansion.
    bors committed Apr 20, 2021
    Configuration menu
    Copy the full SHA
    ec38ea1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e9696c8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a2f2179 View commit details
    Browse the repository at this point in the history
  5. Tidy

    oli-obk authored and pnkfelix committed Apr 20, 2021
    Configuration menu
    Copy the full SHA
    a46bc56 View commit details
    Browse the repository at this point in the history
  6. Typo

    oli-obk authored and pnkfelix committed Apr 20, 2021
    Configuration menu
    Copy the full SHA
    6e988c0 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    85b1c67 View commit details
    Browse the repository at this point in the history

Commits on Apr 21, 2021

  1. Auto merge of rust-lang#7109 - ctennis:ct/asm_syntax_aarch64, r=flip1995

    Ignore aarch64 for this test as it's x86 assembly only.  Fixes rust-lang#7091
    
    fixes rust-lang#7091 - asm_syntax lint test will not compile on aarch64
    
    changelog: none
    bors committed Apr 21, 2021
    Configuration menu
    Copy the full SHA
    926286a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    259a368 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7cb1dcd View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    312b4fd View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d3e0d2f View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#7083 - GuillaumeGomez:bool-assert-eq, r=camst…

    …effen
    
    Add lint to check for boolean comparison in assert macro calls
    
    This PR adds a lint to check if an assert macro is using a boolean as "comparison value". For example:
    
    ```rust
    assert_eq!("a".is_empty(), false);
    ```
    
    Could be rewritten as:
    
    ```rust
    assert!(!"a".is_empty());
    ```
    
    PS: The dev guidelines are amazing. Thanks a lot for writing them!
    
    changelog: Add `bool_assert_comparison` lint
    bors committed Apr 21, 2021
    Configuration menu
    Copy the full SHA
    bbc22e2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    224881b View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#7072 - ebobrow:imports-ending-with-self, r=ca…

    …msteffen
    
    add unnecessary_self_imports lint
    
    fixes rust-lang#6552
    
    changelog: add `unnecessary_self_imports` lint
    bors committed Apr 21, 2021
    Configuration menu
    Copy the full SHA
    79b9eb5 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2021

  1. Auto merge of rust-lang#7102 - taralx:taralx-patch-1, r=flip1995

    Switch transmute_ptr_to_ptr to "pedantic" class.
    
    Per discussion in rust-lang/rust-clippy#6372, this lint has significant false positives.
    
    changelog: transmute_ptr_to_ptr defaults to "allow".
    bors committed Apr 22, 2021
    Configuration menu
    Copy the full SHA
    1f7aef3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    44c8057 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    876897d View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#7119 - flip1995:rustup, r=flip1995

    Rustup
    
    r? `@ghost`
    
    changelog: none
    bors committed Apr 22, 2021
    Configuration menu
    Copy the full SHA
    98e2b9f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9482caf View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2021

  1. rustdoc: Remove unnecessary is_crate field from doctree::Module and…

    … clean::Module
    
    It can be calculated on-demand even without a TyCtxt.
    
    This also changed `from_item_kind` to take a whole item, which avoids
    having to add more and more parameters.
    jyn514 committed Apr 23, 2021
    Configuration menu
    Copy the full SHA
    e29f46c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1481af9 View commit details
    Browse the repository at this point in the history
  3. Use ItemType in cache

    jyn514 committed Apr 23, 2021
    Configuration menu
    Copy the full SHA
    f3ef4b2 View commit details
    Browse the repository at this point in the history
  4. Remove TypeKind

    jyn514 committed Apr 23, 2021
    Configuration menu
    Copy the full SHA
    0a9b2ca View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8fd29bf View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    18ee323 View commit details
    Browse the repository at this point in the history
  7. Fix macro bug in impl From<DefKind> for ItemType

    This was missed a while ago when support for proc-macro attributes was
    first added.
    jyn514 committed Apr 23, 2021
    Configuration menu
    Copy the full SHA
    ab54197 View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2021

  1. Rollup merge of rust-lang#83519 - oli-obk:assign_shrink_your_normal_c…

    …ode, r=pnkfelix
    
    Implement a lint that highlights all moves larger than a configured limit
    
    Tracking issue: rust-lang#83518
    [MCP 420](rust-lang/compiler-team#420) still ~blazing~ in progress
    
    r? ```@pnkfelix```
    
    The main open issue I see with this minimal impl of the feature is that the lint is immediately "stable" (so it can be named on stable), even if it is never executed on stable. I don't think we have the concept of unstable lint names or hiding lint names without an active feature gate, so that would be a bigger change.
    JohnTitor authored Apr 24, 2021
    Configuration menu
    Copy the full SHA
    ee9e27c View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#84299 - lcnr:const-generics-defaults-name-r…

    …es, r=varkor
    
    various const parameter defaults improvements
    
    Actually resolve names in const parameter defaults, fixing `struct Foo<const N: usize = { usize::MAX }>`.
    
    ---
    Split generic parameter ban rib for types and consts, allowing
    ```rust
    #![feature(const_generics_defaults)]
    struct Q;
    struct Foo<T = Q, const Q: usize = 3>(T);
    ```
    
    ---
    Remove the type/const ordering restriction if `const_generics_defaults` is active, even if `const_generics` is not. allowing us to stabilize and test const param defaults separately.
    
    ---
    Check well formedness of const parameter defaults, eagerly emitting an error for `struct Foo<const N: usize = { 0 - 1 }>`
    
    ---
    Do not forbid const parameters in param defaults, allowing `struct Foo<const N: usize, T = [u8; N]>(T)` and `struct Foo<const N: usize, const M: usize = N>`. Note that this should not change anything which is stabilized, as on stable, type parameters must be in front of const parameters, which means that type parameter defaults are only allowed if no const parameters exist.
    
    We still forbid generic parameters inside of const param types.
    
    r? `````````@varkor````````` `````````@petrochenkov`````````
    JohnTitor authored Apr 24, 2021
    Configuration menu
    Copy the full SHA
    09d5fa4 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#84310 - RalfJung:const-fn-feature-flags, r=…

    …oli-obk
    
    further split up const_fn feature flag
    
    This continues the work on splitting up `const_fn` into separate feature flags:
    * `const_fn_trait_bound` for `const fn` with trait bounds
    * `const_fn_unsize` for unsizing coercions in `const fn` (looks like only `dyn` unsizing is still guarded here)
    
    I don't know if there are even any things left that `const_fn` guards... at least libcore and liballoc do not need it any more.
    
    ``@oli-obk`` are you currently able to do reviews?
    JohnTitor authored Apr 24, 2021
    Configuration menu
    Copy the full SHA
    8f54eab View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#84427 - flip1995:clippyup, r=Manishearth

    Update Clippy
    
    r? ```@Manishearth```
    
    Biweekly Clippy update.
    JohnTitor authored Apr 24, 2021
    Configuration menu
    Copy the full SHA
    da8d948 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#84460 - jyn514:doctree-is-crate, r=camelid

    rustdoc: Remove unnecessary `is_crate` field from doctree::Module and clean::Module
    
    It can be calculated on-demand even without a TyCtxt.
    
    This also changed `json::conversions::from_item_kind` to take a whole item, which avoids
    having to add more and more parameters.
    
    Helps with rust-lang#76382.
    
    r? ```@camelid```
    JohnTitor authored Apr 24, 2021
    Configuration menu
    Copy the full SHA
    5315f50 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#84464 - jyn514:type-kind, r=CraftSpider

    rustdoc: Get rid of `clean::TypeKind`
    
    It does exactly the same thing as ItemType.
    JohnTitor authored Apr 24, 2021
    Configuration menu
    Copy the full SHA
    3276103 View commit details
    Browse the repository at this point in the history