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 10 pull requests #92880

Closed
wants to merge 124 commits into from

Commits on Oct 20, 2021

  1. Remove NullOp::Box

    nbdd0121 committed Oct 20, 2021
    Configuration menu
    Copy the full SHA
    1788cfd View commit details
    Browse the repository at this point in the history

Commits on Dec 23, 2021

  1. fix clippy

    lcnr committed Dec 23, 2021
    Configuration menu
    Copy the full SHA
    d5cbae9 View commit details
    Browse the repository at this point in the history

Commits on Dec 28, 2021

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

Commits on Dec 29, 2021

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

Commits on Dec 30, 2021

  1. Configuration menu
    Copy the full SHA
    97ab44c View commit details
    Browse the repository at this point in the history
  2. Remove method_call! macro

    camsteffen committed Dec 30, 2021
    Configuration menu
    Copy the full SHA
    2b5257e View commit details
    Browse the repository at this point in the history

Commits on Dec 31, 2021

  1. Auto merge of rust-lang#92252 - GuillaumeGomez:update-pulldown, r=cam…

    …elid,xFrednet
    
    Update pulldown-cmark version to 0.9
    
    Fixes rust-lang#92206.
    
    r? `@camelid`
    bors committed Dec 31, 2021
    Configuration menu
    Copy the full SHA
    1f3d6a6 View commit details
    Browse the repository at this point in the history
  2. Extend [unused_io_amount] to cover AsyncRead and AsyncWrite.

    Clippy helpfully warns about code like this, telling you that you
    probably meant "write_all":
    
        fn say_hi<W:Write>(w: &mut W) {
           w.write(b"hello").unwrap();
        }
    
    This patch attempts to extend the lint so it also covers this
    case:
    
        async fn say_hi<W:AsyncWrite>(w: &mut W) {
           w.write(b"hello").await.unwrap();
        }
    
    (I've run into this second case several times in my own programming,
    and so have my coworkers, so unless we're especially accident-prone
    in this area, it's probably worth addressing?)
    
    This patch covers the Async{Read,Write}Ext traits in futures-rs,
    and in tokio, since both are quite widely used.
    
    changelog: [`unused_io_amount`] now supports AsyncReadExt and AsyncWriteExt.
    nmathewson committed Dec 31, 2021
    Configuration menu
    Copy the full SHA
    65d1f83 View commit details
    Browse the repository at this point in the history
  3. unused_io_amount: Use span_lint_and_help.

    This improves the quality of the genrated output and makes it
    more in line with other lint messages.
    
    changelog: [`unused_io_amount`]: Improve help text
    nmathewson committed Dec 31, 2021
    Configuration menu
    Copy the full SHA
    b6bcf0c View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#8179 - nmathewson:unused_async_io_amount, r=x…

    …Frednet
    
    Extend unused_io_amount to cover async io.
    
    Clippy helpfully warns about code like this, telling you that you
    probably meant "write_all":
    
        fn say_hi<W:Write>(w: &mut W) {
           w.write(b"hello").unwrap();
        }
    
    This patch attempts to extend the lint so it also covers this
    case:
    
        async fn say_hi<W:AsyncWrite>(w: &mut W) {
           w.write(b"hello").await.unwrap();
        }
    
    (I've run into this second case several times in my own programming,
    and so have my coworkers, so unless we're especially accident-prone
    in this area, it's probably worth addressing?)
    
    Since this is my first attempt at a clippy patch, I've probably
    made all kinds of mistakes: please help me fix them?  I'd like
    to learn more here.
    
    Open questions I have:
    
      * Should this be a separate lint from unused_io_amount?  Maybe
        unused_async_io_amount?  If so, how should I structure their
        shared code?
      * Should this cover tokio's AsyncWrite too?
      * Is it okay to write lints for stuff that isn't part of
        the standard library?  I see that "regex" also has lints,
        and I figure that "futures" is probably okay too, since it's
        an official rust-lang repository.
      * What other tests are needed?
      * How should I improve the code?
    
    Thanks for your time!
    
    ---
    
    changelog: [`unused_io_amount`] now supports async read and write traits
    bors committed Dec 31, 2021
    Configuration menu
    Copy the full SHA
    490566b View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#8193 - ebobrow:redundant_closure_fp, r=Manish…

    …earth
    
    fix [`redundant_closure`] fp with `Rc<F>`/`Arc<F>`
    
    fixes rust-lang#8073
    
    changelog: don't trigger [`redundant_closure`] on `Arc<F>` or `Rc<F>`
    bors committed Dec 31, 2021
    Configuration menu
    Copy the full SHA
    c736a63 View commit details
    Browse the repository at this point in the history

Commits on Jan 1, 2022

  1. wrong_self_convention: Match SelfKind::No more restrictively

    The `wrong_self_convention` lint uses a `SelfKind` type to decide
    whether a method has the right kind of "self" for its name, or whether
    the kind of "self" it has makes its name confusable for a method in
    a common trait.  One possibility is `SelfKind::No`, which is supposed
    to mean "No `self`".
    
    Previously, SelfKind::No matched everything _except_ Self, including
    references to Self.  This patch changes it to match Self, &Self, &mut
    Self, Box<Self>, and so on.
    
    For example, this kind of method was allowed before:
    
    ```
    impl S {
        // Should trigger the lint, because
        // "methods called `is_*` usually take `self` by reference or no `self`"
        fn is_foo(&mut self) -> bool { todo!() }
    }
    ```
    
    But since SelfKind::No matched "&mut self", no lint was triggered
    (see rust-lang#8142).
    
    With this patch, the code above now gives a lint as expected.
    
    Fixes rust-lang#8142
    
    changelog: [`wrong_self_convention`] rejects `self` references in more cases
    nmathewson committed Jan 1, 2022
    Configuration menu
    Copy the full SHA
    3d41358 View commit details
    Browse the repository at this point in the history
  2. Make tidy check for magic numbers that spell things

    Remove existing problematic cases.
    joshtriplett committed Jan 1, 2022
    Configuration menu
    Copy the full SHA
    f5bbd1b View commit details
    Browse the repository at this point in the history
  3. return_self_not_must_use document #[must_use] on the type

    Inspired by a discussion in rust-lang/rust-clippy#8197
    
    ---
    
    r? `@llogiq`
    
    changelog: none
    
    The lint is this on nightly, therefore no changelog entry for you xD
    bors committed Jan 1, 2022
    Configuration menu
    Copy the full SHA
    262b148 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#8209 - xFrednet:8197-mention-attribute-on-str…

    …uct, r=llogiq
    
    return_self_not_must_use document `#[must_use]` on the type
    
    Inspired by a discussion in rust-lang/rust-clippy#8197
    
    ---
    
    r? `@llogiq`
    
    changelog: none
    
    The lint is this on nightly, therefore no changelog entry for you xD
    bors committed Jan 1, 2022
    Configuration menu
    Copy the full SHA
    7616eb0 View commit details
    Browse the repository at this point in the history

Commits on Jan 2, 2022

  1. Auto merge of rust-lang#8208 - nmathewson:selfkind_no_fix, r=xFrednet

    wrong_self_convention: Match `SelfKind::No` more restrictively
    
    The `wrong_self_convention` lint uses a `SelfKind` type to decide
    whether a method has the right kind of "self" for its name, or whether
    the kind of "self" it has makes its name confusable for a method in
    a common trait.  One possibility is `SelfKind::No`, which is supposed
    to mean "No `self`".
    
    Previously, SelfKind::No matched everything _except_ Self, including
    references to Self.  This patch changes it to match Self, &Self, &mut
    Self, Box<Self>, and so on.
    
    For example, this kind of method was allowed before:
    
    ```
    impl S {
        // Should trigger the lint, because
        // "methods called `is_*` usually take `self` by reference or no `self`"
        fn is_foo(&mut self) -> bool { todo!() }
    }
    ```
    
    But since SelfKind::No matched "&mut self", no lint was triggered
    (see rust-lang#8142).
    
    With this patch, the code above now gives a lint as expected.
    
    fixes rust-lang#8142
    
    changelog: [`wrong_self_convention`] rejects `self` references in more cases
    bors committed Jan 2, 2022
    Configuration menu
    Copy the full SHA
    b25dbc6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e8b6b2a View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#8204 - wigy-opensource-developer:fix-7210, r=…

    …xFrednet
    
    [`erasing_op`] lint ignored when operation `Output` type is different from the type of constant `0`
    
    fixes rust-lang#7210
    
    changelog: [`erasing_op`] lint ignored when operation `Output` type is different from the type of constant `0`
    bors committed Jan 2, 2022
    Configuration menu
    Copy the full SHA
    8419108 View commit details
    Browse the repository at this point in the history

Commits on Jan 3, 2022

  1. Rollup merge of rust-lang#90102 - nbdd0121:box3, r=jonas-schievink

    Remove `NullOp::Box`
    
    Follow up of rust-lang#89030 and MCP rust-lang/compiler-team#460.
    
    ~1 month later nothing seems to be broken, apart from a small regression that rust-lang#89332 (1aac85bb716c09304b313d69d30d74fe7e8e1a8e) shows could be regained by remvoing the diverging path, so it shall be safe to continue and remove `NullOp::Box` completely.
    
    r? `@jonas-schievink`
    `@rustbot` label T-compiler
    matthiaskrgr authored Jan 3, 2022
    Configuration menu
    Copy the full SHA
    6975071 View commit details
    Browse the repository at this point in the history
  2. Fix clippy warnings

    pmnoxx committed Jan 3, 2022
    Configuration menu
    Copy the full SHA
    19cfcd5 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#8216 - pmnoxx:piotr-fix-clippy-warnings, r=xF…

    …rednet
    
    Fix `clippy::use-self`` warning in ` src/main.rs`
    
    `ClippyCmd` warnings gets generated due to addition of `clippy::use-self`. This PR fixes that.
    
    ```
    warning: unnecessary structure name repetition
      --> src/main.rs:99:9
       |
    99 |         ClippyCmd {
       |         ^^^^^^^^^ help: use the applicable keyword: `Self`
       |
       = note: `-W clippy::use-self` implied by `-W clippy::nursery`
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
    ```
    
    ---
    
    changelog: none
    bors committed Jan 3, 2022
    Configuration menu
    Copy the full SHA
    3ea7784 View commit details
    Browse the repository at this point in the history

Commits on Jan 4, 2022

  1. Configuration menu
    Copy the full SHA
    ff58efb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    00da1b8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a7097b8 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#8220 - Jarcho:manual_swap_8154, r=camsteffen

    Consider auto-deref when linting `manual_swap`
    
    fixes rust-lang#8154
    
    changelog: Don't lint `manual_swap` when a field access involves auto-deref
    bors committed Jan 4, 2022
    Configuration menu
    Copy the full SHA
    0e28e38 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2dd216a View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#91907 - lcnr:const-arg-infer, r=BoxyUwU

    Allow `_` as the length of array types and repeat expressions
    
    r? `@BoxyUwU` cc `@varkor`
    matthiaskrgr authored Jan 4, 2022
    Configuration menu
    Copy the full SHA
    d7a6033 View commit details
    Browse the repository at this point in the history
  7. New macro utils

    changelog: none
    
    Sorry, this is a big one. A lot of interrelated changes and I wanted to put the new utils to use to make sure they are somewhat battle-tested. We may want to divide some of the lint-specific refactoring commits into batches for smaller reviewing tasks. I could also split into more PRs.
    
    Introduces a bunch of new utils at `clippy_utils::macros::...`. Please read through the docs and give any feedback! I'm happy to introduce `MacroCall` and various functions to retrieve an instance. It feels like the missing puzzle piece. I'm also introducing `ExpnId` from rustc as "useful for Clippy too". `@rust-lang/clippy`
    
    Fixes rust-lang#7843 by not parsing every node of macro implementations, at least the major offenders.
    
    I probably want to get rid of `is_expn_of` at some point.
    bors committed Jan 4, 2022
    Configuration menu
    Copy the full SHA
    786f874 View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#8219 - camsteffen:macro-decoupling, r=llogiq

    New macro utils
    
    changelog: none
    
    Sorry, this is a big one. A lot of interrelated changes and I wanted to put the new utils to use to make sure they are somewhat battle-tested. We may want to divide some of the lint-specific refactoring commits into batches for smaller reviewing tasks. I could also split into more PRs.
    
    Introduces a bunch of new utils at `clippy_utils::macros::...`. Please read through the docs and give any feedback! I'm happy to introduce `MacroCall` and various functions to retrieve an instance. It feels like the missing puzzle piece. I'm also introducing `ExpnId` from rustc as "useful for Clippy too". `@rust-lang/clippy`
    
    Fixes rust-lang#7843 by not parsing every node of macro implementations, at least the major offenders.
    
    I probably want to get rid of `is_expn_of` at some point.
    bors committed Jan 4, 2022
    Configuration menu
    Copy the full SHA
    ba03dc7 View commit details
    Browse the repository at this point in the history

Commits on Jan 5, 2022

  1. Auto merge of rust-lang#8223 - camsteffen:remove-in-macro, r=llogiq

    Remove in_macro from clippy_utils
    
    changelog: none
    
    Previously done in rust-lang#7897 but reverted in rust-lang#8170. I'd like to keep `in_macro` out of utils because if a span is from expansion in any way (desugaring or macro), we should not proceed without understanding the nature of the expansion IMO.
    
    r? `@llogiq`
    bors committed Jan 5, 2022
    Configuration menu
    Copy the full SHA
    d5dcda2 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#8224 - Jarcho:type_repetition_in_bounds_8162,…

    … r=llogiq
    
    Fix `type_repetition_in_bounds`
    
    fixes rust-lang#7360
    fixes rust-lang#8162
    fixes rust-lang#8056
    
    changelog: Check for full equality in `type_repetition_in_bounds` rather than just equal hashes
    bors committed Jan 5, 2022
    Configuration menu
    Copy the full SHA
    20f2a89 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#8221 - Jarcho:while_let_on_iterator_8113, r=l…

    …logiq
    
    Better detect when a field can be moved from in `while_let_on_iterator`
    
    fixes rust-lang#8113
    
    changelog: Better detect when a field can be moved from in `while_let_on_iterator`
    bors committed Jan 5, 2022
    Configuration menu
    Copy the full SHA
    92048f4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a4ebf6f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    14f3445 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3925def View commit details
    Browse the repository at this point in the history
  7. Lint iter_not_returning_iterator on the trait definition rather tha…

    …n the implementation
    Jarcho committed Jan 5, 2022
    Configuration menu
    Copy the full SHA
    2cc38a2 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    d98339d View commit details
    Browse the repository at this point in the history

Commits on Jan 6, 2022

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

Commits on Jan 7, 2022

  1. Auto merge of rust-lang#8234 - Alexendoo:lintcheck-allow-renamed-dir,…

    … r=xFrednet
    
    Allow running lintcheck with a renamed rust-clippy dir
    
    I have Clippy checked out in `rust/clippy` rather than `rust/rust-clippy`, this allows lintcheck to still run in that case
    
    changelog: none
    bors committed Jan 7, 2022
    Configuration menu
    Copy the full SHA
    be7cf76 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c34e3f0 View commit details
    Browse the repository at this point in the history

Commits on Jan 8, 2022

  1. Configuration menu
    Copy the full SHA
    366234a View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#8201 - smoelius:master, r=camsteffen

    Change `unnecessary_to_owned` `into_iter` suggestions to `MaybeIncorrect`
    
    I am having a hard time finding a good solution for rust-lang#8148, so I am wondering if is enough to just change the suggestion's applicability to `MaybeIncorrect`?
    
    I apologize, as I realize this is a bit of a cop out.
    
    changelog: none
    bors committed Jan 8, 2022
    Configuration menu
    Copy the full SHA
    917890b View commit details
    Browse the repository at this point in the history
  3. Set binary-dep-depinfo in .cargo/config.toml

    Fixes rust-lang#8248
    
    According to https://doc.rust-lang.org/cargo/reference/unstable this
    seems to be the right place to set it, and it does fix the build for me.
    
    I haven't removed the other `rustflags` because perhaps it's needed on
    different cargo/rust versions?
    sourcefrog committed Jan 8, 2022
    Configuration menu
    Copy the full SHA
    3ea5208 View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2022

  1. Auto merge of rust-lang#8249 - sourcefrog:depinfo, r=Manishearth

    Set binary-dep-depinfo in .cargo/config.toml
    
    Fixes rust-lang#8248
    
    According to https://doc.rust-lang.org/cargo/reference/unstable this
    seems to be the right place to set it, and it does fix the build for me.
    
    I haven't removed the other `rustflags` because perhaps it's needed on
    different cargo/rust versions?
    
    ---
    
    *Please write a short comment explaining your change (or "none" for internal only changes)*
    
    changelog: none
    bors committed Jan 9, 2022
    Configuration menu
    Copy the full SHA
    83a9f68 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1288b80 View commit details
    Browse the repository at this point in the history
  3. rustc_metadata: Rename item_children(_untracked) to `module_childre…

    …n(_untracked)`
    
    And `each_child_of_item` to `for_each_module_child`
    petrochenkov committed Jan 9, 2022
    Configuration menu
    Copy the full SHA
    c8ea042 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f690978 View commit details
    Browse the repository at this point in the history
  5. new lint: single_char_lifetime_names

    This pull request adds a lint against single character lifetime names, as they might not divulge enough information about the purpose of the lifetime. This can make code harder to understand. I placed this in `restriction` rather than `pedantic` (as suggested in rust-lang#8233) since most of the Rust ecosystem already uses single character lifetime names (to my knowledge, at least) and since single character lifetime names aren't incorrect. I'd be happy to change this upon request, however. Fixes rust-lang#8233.
    
    - [x] Followed lint naming conventions
    - [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`
    
    changelog: new lint: [`single_char_lifetime_names`]
    bors committed Jan 9, 2022
    Configuration menu
    Copy the full SHA
    a6f80fc View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#8236 - PatchMixolydic:single_char_lifetime_na…

    …mes, r=llogiq
    
    new lint: `single_char_lifetime_names`
    
    This pull request adds a lint against single character lifetime names, as they might not divulge enough information about the purpose of the lifetime. This can make code harder to understand. I placed this in `restriction` rather than `pedantic` (as suggested in rust-lang#8233) since most of the Rust ecosystem already uses single character lifetime names (to my knowledge, at least) and since single character lifetime names aren't incorrect. I'd be happy to change this upon request, however. Fixes rust-lang#8233.
    
    - [x] Followed lint naming conventions
    - [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`
    
    changelog: new lint: [`single_char_lifetime_names`]
    bors committed Jan 9, 2022
    Configuration menu
    Copy the full SHA
    5991695 View commit details
    Browse the repository at this point in the history

Commits on Jan 10, 2022

  1. Configuration menu
    Copy the full SHA
    16d8488 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e2ce4f9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f4dc348 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#8252 - dswij:8229, r=xFrednet

    cover trait for `trait_duplication_in_bounds`
    
    closes rust-lang#8229
    
    changelog: [`trait_duplication_in_bounds`] covers trait functions with `Self` bounds
    bors committed Jan 10, 2022
    Configuration menu
    Copy the full SHA
    88cfd70 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#8257 - camsteffen:internal-features, r=giraffate

    Combine internal cargo features
    
    changelog: none
    
    This is just simpler and I don't see any downsides.
    bors committed Jan 10, 2022
    Configuration menu
    Copy the full SHA
    1816361 View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#8228 - Jarcho:iter_not_returning_iterator_822…

    …5, r=giraffate
    
    fix `iter_not_returning_iterator`
    
    fixes rust-lang#8225
    
    changelog: Handle type projections in `iter_not_returning_iterator`
    changelog: Don't lint `iter_not_returning_iterator` in trait implementations
    changelog: Lint `iter_not_returning_iterator` in trait definitions
    bors committed Jan 10, 2022
    Configuration menu
    Copy the full SHA
    b66dbe8 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    cf86cee View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    5f143c6 View commit details
    Browse the repository at this point in the history
  9. Run dogfood on windows

    I believe this is possible as of rust-lang/rust-clippy#7631
    camsteffen committed Jan 10, 2022
    Configuration menu
    Copy the full SHA
    e66ecf6 View commit details
    Browse the repository at this point in the history
  10. Fix output capturing

    camsteffen committed Jan 10, 2022
    Configuration menu
    Copy the full SHA
    7cf4f44 View commit details
    Browse the repository at this point in the history
  11. Refactor test utils

    camsteffen committed Jan 10, 2022
    Configuration menu
    Copy the full SHA
    51dbbf3 View commit details
    Browse the repository at this point in the history
  12. Use rustup which rustfmt

    camsteffen committed Jan 10, 2022
    Configuration menu
    Copy the full SHA
    d356fb9 View commit details
    Browse the repository at this point in the history
  13. Move workspace test

    camsteffen committed Jan 10, 2022
    Configuration menu
    Copy the full SHA
    920e9f0 View commit details
    Browse the repository at this point in the history
  14. Merge dogfood tests

    The two dogfood tests cannot be run concurrently since they use the same
    target directory.
    camsteffen committed Jan 10, 2022
    Configuration menu
    Copy the full SHA
    4a54933 View commit details
    Browse the repository at this point in the history
  15. Remove rustfmt component check

    This was more valuable when we used the latest nightly without
    specifying the toolchain version.
    camsteffen committed Jan 10, 2022
    Configuration menu
    Copy the full SHA
    21343ab View commit details
    Browse the repository at this point in the history
  16. Auto merge of rust-lang#8261 - taiki-e:disallowed, r=giraffate

    Warn disallowed_methods and disallowed_types by default
    
    Closes rust-lang#7841
    
    changelog: Moved [`disallowed_methods`] and [`disallowed_types`] to `style`
    bors committed Jan 10, 2022
    Configuration menu
    Copy the full SHA
    51282fc View commit details
    Browse the repository at this point in the history

Commits on Jan 11, 2022

  1. Fix dogfood

    camsteffen committed Jan 11, 2022
    Configuration menu
    Copy the full SHA
    01ef7c7 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#8260 - taiki-e:mutex_atomic, r=llogiq

    Downgrade mutex_atomic to nursery
    
    See rust-lang#1516 and rust-lang#4295.
    
    There are suggestions about removing this lint from the default warned lints in both issues.
    Also, [`mutex_integer`](https://rust-lang.github.io/rust-clippy/master/index.html#mutex_integer) lint that has the same problems as this lint is in `nursery` group.
    
    changelog: Moved [`mutex_atomic`] to `nursery`
    bors committed Jan 11, 2022
    Configuration menu
    Copy the full SHA
    fccf07b View commit details
    Browse the repository at this point in the history
  3. Add borrow_as_ptr lint

    Closes: rust-lang#6995
    
    Signed-off-by: Federico Guerinoni <guerinoni.federico@gmail.com>
    Co-authored-by: Paolo Barbolini <paolo@paolo565.org>
    2 people authored and Federico Guerinoni committed Jan 11, 2022
    Configuration menu
    Copy the full SHA
    3298de7 View commit details
    Browse the repository at this point in the history
  4. README: clippy-driver is not a replacement for rustc

    Currently, `clippy-driver` may run codegen, but this is an
    implementation detail.
    
    See rust-lang/rust-clippy#8035.
    
    Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
    ojeda committed Jan 11, 2022
    Configuration menu
    Copy the full SHA
    fd97d79 View commit details
    Browse the repository at this point in the history
  5. README: mention clippy-driver on usage list

    Removes the "compiled from source" bit, which is confusing.
    
    Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
    ojeda committed Jan 11, 2022
    Configuration menu
    Copy the full SHA
    3d4fded View commit details
    Browse the repository at this point in the history
  6. Store a Symbol instead of an Ident in VariantDef/FieldDef

    The field is also renamed from `ident` to `name. In most cases,
    we don't actually need the `Span`. A new `ident` method is added
    to `VariantDef` and `FieldDef`, which constructs the full `Ident`
    using `tcx.def_ident_span()`. This method is used in the cases
    where we actually need an `Ident`.
    
    This makes incremental compilation properly track changes
    to the `Span`, without all of the invalidations caused by storing
    a `Span` directly via an `Ident`.
    Aaron1011 committed Jan 11, 2022
    Configuration menu
    Copy the full SHA
    dda2aef View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#8210 - guerinoni:master, r=Manishearth

    Add borrow_as_ptr lint
    
    Closes: rust-lang#6995
    
    - \[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`
    
    ---
    
    changelog: new lint: [`borrow_as_ptr`]
    bors committed Jan 11, 2022
    Configuration menu
    Copy the full SHA
    fd9cebe View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    02ec39b View commit details
    Browse the repository at this point in the history
  9. Partially stabilize maybe_uninit_extra

    This covers:
    
        impl<T> MaybeUninit<T> {
            pub unsafe fn assume_init_read(&self) -> T { ... }
            pub unsafe fn assume_init_drop(&mut self) { ... }
        }
    
    It does not cover the const-ness of `write` under
    `const_maybe_uninit_write` nor the const-ness of
    `assume_init_read` (this commit adds
    `const_maybe_uninit_assume_init_read` for that).
    
    FCP: rust-lang#63567 (comment).
    
    Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
    ojeda committed Jan 11, 2022
    Configuration menu
    Copy the full SHA
    8680a44 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    7e989ec View commit details
    Browse the repository at this point in the history
  11. Auto merge of rust-lang#8262 - 1nF0rmed:chore-update-borrowed-box-doc…

    …, r=camsteffen
    
    Improve documentation for `borrowed-box` lint
    
    fixes rust-lang#8161
    
    Updates documentation to elaborate more on how removing Box from a function parameter can generalize the function.
    
    changelog: none
    bors committed Jan 11, 2022
    Configuration menu
    Copy the full SHA
    88f5be2 View commit details
    Browse the repository at this point in the history

Commits on Jan 12, 2022

  1. Configuration menu
    Copy the full SHA
    40f33a7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d32277d View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#8268 - Jarcho:deref_addrof_8247, r=flip1995

    Fix `deref_addrof`
    
    fixes rust-lang#8247
    
    This would supersede rust-lang#8259
    
    changelog: Don't lint `deref_addrof` when the dereference and the borrow occur in different contexts
    bors committed Jan 12, 2022
    Configuration menu
    Copy the full SHA
    37e9985 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#8198 - camsteffen:no-method-call-macro, r=fli…

    …p1995
    
    Remove method_call! macro
    
    This is possible now that `SymbolStr` is removed from rustc.
    
    changelog: none
    bors committed Jan 12, 2022
    Configuration menu
    Copy the full SHA
    0d94167 View commit details
    Browse the repository at this point in the history
  5. Don't fall back to crate-level opaque type definitions.

    That would just hide bugs, as it works accidentally if the opaque type
    is defined at the crate level.
    oli-obk committed Jan 12, 2022
    Configuration menu
    Copy the full SHA
    956db07 View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#8190 - camsteffen:no-in-band-liftetimes, r=fl…

    …ip1995
    
    Stop using `in_band_lifetimes`
    
    Per rust-lang#91867
    
    changelog: none
    bors committed Jan 12, 2022
    Configuration menu
    Copy the full SHA
    ae01c4a View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#8037 - ojeda:doc-codegen-change, r=camsteffen

    `README`: document that Clippy may change codegen
    
    Currently, Clippy does not guarantee the same codegen will be produced.
    Therefore, it should not be used as an universal replacement for `rustc`.
    
    See rust-lang/rust-clippy#8035.
    
    Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
    
    fixes rust-lang#8035
    changelog: document that Clippy may change codegen
    bors committed Jan 12, 2022
    Configuration menu
    Copy the full SHA
    b9cae79 View commit details
    Browse the repository at this point in the history
  8. Add manual_bits lint

    paolobarbolini committed Jan 12, 2022
    Configuration menu
    Copy the full SHA
    166737f View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    91581f6 View commit details
    Browse the repository at this point in the history
  10. Auto merge of rust-lang#8213 - paolobarbolini:size-of-as-bits, r=flip…

    …1995
    
    Add `manual_bits` lint
    
    Closes rust-lang#6670
    
    ---
    
    changelog: new lint: [`manual_bits`]
    bors committed Jan 12, 2022
    Configuration menu
    Copy the full SHA
    7c82ae1 View commit details
    Browse the repository at this point in the history
  11. Use method name from conf::DisallowedMethod

    Since def_path_str returns e.g. "core::f32::<impl f32>::clamp" for
    "f32::clamp"
    Alexendoo committed Jan 12, 2022
    Configuration menu
    Copy the full SHA
    04eb27a View commit details
    Browse the repository at this point in the history
  12. Auto merge of rust-lang#8112 - Alexendoo:disallowed_methods_primitive…

    …s, r=flip1995
    
    Allow primitive types in disallowed_methods
    
    Fixes rust-lang#8079
    
    changelog: `disallowed_methods`: Now can disallow methods of primitive types
    bors committed Jan 12, 2022
    Configuration menu
    Copy the full SHA
    6f33f69 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    90bf72c View commit details
    Browse the repository at this point in the history
  14. Auto merge of rust-lang#8265 - camsteffen:which-rustfmt, r=xFrednet

    Cache rustfmt path
    
    changelog: none
    
    Call `rustup which rustfmt` and use the output. This shaves off  ~0.7 seconds for `cargo dev fmt` for me.
    bors committed Jan 12, 2022
    Configuration menu
    Copy the full SHA
    133b366 View commit details
    Browse the repository at this point in the history
  15. Auto merge of rust-lang#8266 - camsteffen:test-tweaks, r=flip1995

    Some test code cleanup
    
    changelog: none
    
    Mainly moves /clippy_workspace_tests into /tests and combines the two dogfood tests which can't run concurrently.
    bors committed Jan 12, 2022
    Configuration menu
    Copy the full SHA
    5479024 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    062db10 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    0cf7fd1 View commit details
    Browse the repository at this point in the history
  18. Auto merge of rust-lang#8226 - Jarcho:manual_memcpy_8160, r=flip1995

    `manual_memcpy` fix
    
    fixes rust-lang#8160
    
    Ideally this would work with `VecDeque`, but the current interface is unsuitable for it. At a minimum something like `range_as_slices` would be needed.
    
    changelog: Don't lint `manual_memcpy` on `VecDeque`
    changelog: Suggest `copy_from_slice` for `manual_memcpy` when applicable
    bors committed Jan 12, 2022
    Configuration menu
    Copy the full SHA
    60e68d6 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    8568f44 View commit details
    Browse the repository at this point in the history

Commits on Jan 13, 2022

  1. Remove unused link references.

    ehuss committed Jan 13, 2022
    Configuration menu
    Copy the full SHA
    3501a0c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d536886 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    73cb56e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    dadf78c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1e1660d View commit details
    Browse the repository at this point in the history
  6. Fix some links that had colliding reference names.

    These reference names were very general, and used in other places.
    ehuss committed Jan 13, 2022
    Configuration menu
    Copy the full SHA
    8f840d9 View commit details
    Browse the repository at this point in the history
  7. Fix lints documents

    hafeoz committed Jan 13, 2022
    Configuration menu
    Copy the full SHA
    7b74ded View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    11be495 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    8a2141b View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    6ad05bc View commit details
    Browse the repository at this point in the history
  11. Auto merge of rust-lang#8272 - flip1995:rustup, r=flip1995

    Rustup
    
    r? `@ghost`
    
    changelog: none
    bors committed Jan 13, 2022
    Configuration menu
    Copy the full SHA
    97a5daa View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    ba66384 View commit details
    Browse the repository at this point in the history
  13. Update Cargo.lock

    flip1995 committed Jan 13, 2022
    Configuration menu
    Copy the full SHA
    159d6c3 View commit details
    Browse the repository at this point in the history
  14. Fix Clippy sync fallout

    flip1995 committed Jan 13, 2022
    Configuration menu
    Copy the full SHA
    b83c77c View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    bc6b199 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    b8ef148 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    7cc6a73 View commit details
    Browse the repository at this point in the history
  18. Fix and improve missing dot in the item heading

    lolo.branstett@numericable.fr authored and Urgau committed Jan 13, 2022
    Configuration menu
    Copy the full SHA
    d5871d0 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    241d977 View commit details
    Browse the repository at this point in the history

Commits on Jan 14, 2022

  1. Rollup merge of rust-lang#90782 - ricobbe:binutils-dlltool, r=michael…

    …woerister
    
    Implement raw-dylib support for windows-gnu
    
    Add support for `#[link(kind = "raw-dylib")]` on windows-gnu targets.  Work around binutils's linker's inability to read import libraries produced by LLVM by calling out to the binutils `dlltool` utility to create an import library from a temporary .DEF file; this approach is effectively a slightly refined version of ``@mati865's`` earlier attempt at this strategy in PR rust-lang#88801.  (In particular, this attempt at this strategy adds support for `#[link_ordinal(...)]` as well.)
    
    In support of rust-lang#58713.
    matthiaskrgr authored Jan 14, 2022
    Configuration menu
    Copy the full SHA
    6987359 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#92045 - oli-obk:cleanup, r=petrochenkov

    Don't fall back to crate-level opaque type definitions.
    
    That would just hide bugs, as it works accidentally if the opaque type is defined at the crate level.
    
    Only works after rust-lang#90948 which worked by accident for our entire test suite.
    matthiaskrgr authored Jan 14, 2022
    Configuration menu
    Copy the full SHA
    381ca4f View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#92768 - ojeda:stabilize-maybe_uninit_extra,…

    … r=Mark-Simulacrum
    
    Partially stabilize `maybe_uninit_extra`
    
    This covers:
    
    ```rust
    impl<T> MaybeUninit<T> {
        pub unsafe fn assume_init_read(&self) -> T { ... }
        pub unsafe fn assume_init_drop(&mut self) { ... }
    }
    ```
    
    It does not cover the const-ness of `write` under `const_maybe_uninit_write` nor the const-ness of `assume_init_read` (this commit adds `const_maybe_uninit_assume_init_read` for that).
    
    FCP: rust-lang#63567 (comment).
    
    Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
    matthiaskrgr authored Jan 14, 2022
    Configuration menu
    Copy the full SHA
    eda011c View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#92810 - compiler-errors:deduplicate-box-der…

    …ef-suggestion, r=camelid
    
    Deduplicate box deref and regular deref suggestions
    
    Remove the suggestion code special-cased for Box deref.
    
    r? ``@camelid``
    since you introduced the code in rust-lang#90627
    matthiaskrgr authored Jan 14, 2022
    Configuration menu
    Copy the full SHA
    0c2174c View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#92818 - GuillaumeGomez:update-doc-cfg-doc, …

    …r=camelid
    
    Update documentation for doc_cfg feature
    
    Fixes  rust-lang#92484.
    matthiaskrgr authored Jan 14, 2022
    Configuration menu
    Copy the full SHA
    276dcf4 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#92838 - ehuss:cleanup-release-links, r=Mark…

    …-Simulacrum
    
    Clean up some links in RELEASES
    
    This fixes some issues with markdown links in the RELEASES file.
    matthiaskrgr authored Jan 14, 2022
    Configuration menu
    Copy the full SHA
    d32265b View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#92840 - hafeoz:master, r=ehuss

    Fix some lints documentation
    
    Several lints documentation failed to show the output of the example (mostly due to `ignore` attribute):
    
    - [irrefutable_let_patterns](https://doc.rust-lang.org/rustc/lints/listing/warn-by-default.html#irrefutable-let-patterns)
    - [asm_sub_register](https://doc.rust-lang.org/rustc/lints/listing/warn-by-default.html#asm-sub-register)
    - [bad_asm_style](https://doc.rust-lang.org/rustc/lints/listing/warn-by-default.html#bad-asm-style)
    - [ineffective_unstable_trait_impl](https://doc.rust-lang.org/rustc/lints/listing/deny-by-default.html#ineffective-unstable-trait-impl)
    - duplicate_macro_attributes
    
    This pull request fixes these lints output so that they can be displayed properly.
    matthiaskrgr authored Jan 14, 2022
    Configuration menu
    Copy the full SHA
    a9966f5 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#92849 - flip1995:clippyup, r=Manishearth

    Clippyup
    
    r? ``@Manishearth``
    matthiaskrgr authored Jan 14, 2022
    Configuration menu
    Copy the full SHA
    d793bd2 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#92854 - Urgau:better-rust-logo, r=Guillaume…

    …Gomez
    
    Use the updated Rust logo in rustdoc
    
    This pull-request use the updated Rust logo from rust-lang/rust-artwork#9 and also change the logo format from PNG to SVG.
    
    | Before | After |
    | --- | --- |
    | ![Screenshot 2022-01-13 at 14-33-40 std - Rust](https://user-images.githubusercontent.com/3616612/149342697-7afe4c3e-2be5-444b-86f3-118712b4f7ae.png) | ![Screenshot 2022-01-13 at 14-33-15 std - Rust](https://user-images.githubusercontent.com/3616612/149342705-54ed27c6-0806-4c2d-baa1-4d65ed897e2b.png) |
    
    I also took the liberty to update the two PNG favicons with the SVG reducing their size by ~35% each.
    
    Fixes rust-lang#92831
    
    r? ``@jsha``
    matthiaskrgr authored Jan 14, 2022
    Configuration menu
    Copy the full SHA
    93b3c2c View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#92864 - Urgau:fix-missing-source-dot, r=jsha

    Fix a missing dot in the main item heading
    
    This pull-request fix a missing `·` in the item header ~~and also make use of `&nbsp;` to explicit that the spaces are mandatory~~.
    
    | Before | After |
    | --- | --- |
    | ![image](https://user-images.githubusercontent.com/3616612/149393966-7cca6dc5-9a62-47fa-8c9c-18f936d43aa9.png) | ![image](https://user-images.githubusercontent.com/3616612/149393869-5ffd6e44-d91c-4ece-b69e-d103304f6626.png) |
    
    PS: This was introduce yesterday by rust-lang#92526 (the migration from Tera to Askama) and is not currently observable in the nightly doc.
    matthiaskrgr authored Jan 14, 2022
    Configuration menu
    Copy the full SHA
    a5ac242 View commit details
    Browse the repository at this point in the history