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

Clippy subtree update #127609

Merged
merged 160 commits into from
Jul 11, 2024
Merged

Clippy subtree update #127609

merged 160 commits into from
Jul 11, 2024

Commits on Jun 8, 2024

  1. Configuration menu
    Copy the full SHA
    0eb9f41 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    aff0e6d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b161dc6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2c61b45 View commit details
    Browse the repository at this point in the history
  5. add uitest for issue 12816

    tesuji committed Jun 8, 2024
    Configuration menu
    Copy the full SHA
    e18b27a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ac60028 View commit details
    Browse the repository at this point in the history
  7. Ignore non ExprKind::{Path,Lit) inside const context

    - remove now dead code in ASSERTIONS_ON_CONSTANTS
      cc rust-lang#11966
    - Partially revert "ignore `assertions-on-constants` in const contexts"
      This reverts commit c7074de420a2192fb40d3f2194a20dd0d1b65cc6.
    tesuji committed Jun 8, 2024
    Configuration menu
    Copy the full SHA
    a0234b4 View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2024

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

Commits on Jun 21, 2024

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

Commits on Jun 23, 2024

  1. Fix doc nits

    bitfield committed Jun 23, 2024
    Configuration menu
    Copy the full SHA
    625091d View commit details
    Browse the repository at this point in the history

Commits on Jun 24, 2024

  1. Clarify that modulo_one only applies to ints

    Rudxain authored and rudxain committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    cfccdbb View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2024

  1. Configuration menu
    Copy the full SHA
    b60a6ad View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    abdd057 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    39a2155 View commit details
    Browse the repository at this point in the history

Commits on Jun 28, 2024

  1. doc_lazy_continuation: blank comment line for gap

    This change addresses cases where doc comments are separated
    by blank lines, comments, or non-doc-comment attributes,
    like this:
    
    ```rust
    /// - first line
    // not part of doc comment
    /// second line
    ```
    
    Before this commit, Clippy gave a pedantically-correct
    warning about how you needed to indent the second line.
    This is unlikely to be what the user intends, and has
    been described as a "false positive" (since Clippy is
    warning you about a highly unintuitive behavior that
    Rustdoc actually has, we definitely want it to output
    *something*, but the suggestion to indent was poor).
    
    rust-lang/rust-clippy#12917
    notriddle committed Jun 28, 2024
    Configuration menu
    Copy the full SHA
    6de8782 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#127058 - compiler-errors:tighten-async-span…

    …s, r=oli-obk
    
    Tighten `fn_decl_span` for async blocks
    
    Tightens the span of `async {}` blocks in diagnostics, and subsequently async closures and async fns, by actually setting the `fn_decl_span` correctly. This is kinda a follow-up on rust-lang#125078, but it fixes the problem in a more general way.
    
    I think the diagnostics are significantly improved, since we no longer have a bunch of overlapping spans. I'll point out one caveat where I think the diagnostic may get a bit more confusing, but where I don't think it matters.
    
    r? ````@estebank```` or ````@oli-obk```` or someone else on wg-diag or compiler i dont really care lol
    matthiaskrgr authored Jun 28, 2024
    Configuration menu
    Copy the full SHA
    fb95df7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    01a6dfa View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    74bc964 View commit details
    Browse the repository at this point in the history
  5. address review comments

    fee1-dead committed Jun 28, 2024
    Configuration menu
    Copy the full SHA
    2fcef6e View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#13002 - notriddle:notriddle/blank-line, r=Man…

    …ishearth
    
    doc_lazy_continuation: blank comment line for gap
    
    This change addresses cases where doc comments are separated by blank lines, comments, or non-doc-comment attributes, like this:
    
    ```rust
    /// - first line
    // not part of doc comment
    /// second line
    ```
    
    Before this commit, Clippy gave a pedantically-correct warning about how you needed to indent the second line. This is unlikely to be what the user intends, and has been described as a "false positive." Since Clippy is warning you about a highly unintuitive behavior [that Rustdoc actually has](https://notriddle.com/rustdoc-html-demo-11/lazy-continuation-bad/test_dingus_2024/constant.D.html), we definitely want it to output *something*, but the suggestion to indent was poor.
    
    Fixes rust-lang#12917
    
    ```
    changelog: [`doc_lazy_continuation`]: suggest blank line for likely-unintended lazy continuations
    ```
    bors committed Jun 28, 2024
    Configuration menu
    Copy the full SHA
    2f80536 View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#13006 - flip1995:manual-inspect-error-message…

    …, r=Jarcho
    
    Add error message to manual_inspect lint
    
    r? `@Jarcho`
    
    changelog: none
    bors committed Jun 28, 2024
    Configuration menu
    Copy the full SHA
    1aa236d View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2024

  1. Rollup merge of rust-lang#127045 - compiler-errors:explicit, r=oli-obk

    Rename `super_predicates_of` and similar queries to `explicit_*` to note that they're not elaborated
    
    Rename:
    * `super_predicates_of` -> `explicit_super_predicates_of`
    * `implied_predicates_of` -> `explicit_implied_predicates_of`
    * `supertraits_containing_assoc_item` -> `explicit_supertraits_containing_assoc_item`
    
    This makes it clearer that, unlike (for example) [`TyCtxt::super_traits_of`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/context/struct.TyCtxt.html#method.super_traits_of), we don't automatically elaborate this set of predicates.
    
    r? ``@lcnr`` or ``@oli-obk`` or someone from t-types idc
    matthiaskrgr authored Jun 29, 2024
    Configuration menu
    Copy the full SHA
    4116552 View commit details
    Browse the repository at this point in the history
  2. Image-related valid idents

    kornelski committed Jun 29, 2024
    Configuration menu
    Copy the full SHA
    eb33c1a View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#120639 - fee1-dead-contrib:new-effects-desuga…

    …ring, r=oli-obk
    
    Implement new effects desugaring
    
    cc `@rust-lang/project-const-traits.` Will write down notes once I have finished.
    
    * [x] See if we want `T: Tr` to desugar into `T: Tr, T::Effects: Compat<true>`
    * [x] Fix ICEs on `type Assoc: ~const Tr` and `type Assoc<T: ~const Tr>`
    * [ ] add types and traits to minicore test
    * [ ] update rustc-dev-guide
    
    Fixes rust-lang#119717
    Fixes rust-lang#123664
    Fixes rust-lang#124857
    Fixes rust-lang#126148
    bors committed Jun 29, 2024
    Configuration menu
    Copy the full SHA
    b5f9436 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b08b8b8 View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2024

  1. Auto merge of rust-lang#12970 - J-ZhengLi:new_lint_msrv, r=y21

    fix wrong msrv import in `new_lint` template
    
    changelog: none
    bors committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    06758d8 View commit details
    Browse the repository at this point in the history
  2. manual_inspect: fix clippy::version from 1.78.0 to 1.81.0

    Although `manual_inspect`'s PR started some months ago, the lint is only
    available in the current nightly (1.81.0), rather than 1.78.0.
    
    Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
    ojeda committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    eb1b24a View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#12983 - frp:manual_rotate, r=llogiq

    Implement a lint to replace manual bit rotations with rotate_left/rot…
    
    Fixes rust-lang#6861
    
    r? `@llogiq`
    
    ---
    
    changelog: add [`manual_rotate`] lint
    bors committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    0abcd34 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#13025 - ojeda:manual_inspect_nightly, r=y21

    `manual_inspect`: fix `clippy::version` from 1.78.0 to 1.81.0
    
    Although `manual_inspect`'s PR started some months ago, the lint is only available in the current nightly (1.81.0), rather than 1.78.0.
    
    ```
    changelog: [`manual_inspect`]: fix `clippy::version` from 1.78.0 to 1.81.0
    ```
    bors committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    f24a870 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0dddf6e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5cbf6d5 View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#13026 - alex-semenyuk:fix_doc_verbose_bit_mas…

    …k_example, r=Manishearth
    
    Fix doc for INEFFECTIVE_BIT_MASK and VERBOSE_BIT_MASK
    
    Minor fixes for doc for INEFFECTIVE_BIT_MASK and VERBOSE_BIT_MASK
    
    changelog: [none]
    bors committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    d255efc View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    76a068b View commit details
    Browse the repository at this point in the history
  9. Auto merge of rust-lang#13017 - kornelski:idents, r=blyxyas

    Image-related valid idents
    
    False positives for idents in markdown
    
    changelog: Add "WebP", "OpenExr", "YcbCr", "sRGB" to `doc-valid-idents` default.
    bors committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    0505dad View commit details
    Browse the repository at this point in the history
  10. Auto merge of rust-lang#12840 - tesuji:const-asserts, r=llogiq

    Don't lint `assertions_on_constants` on any const assertions
    
    close rust-lang#12816
    close rust-lang#12847
    cc rust-lang#12817
    
    ----
    
    changelog: Fix false positives in consts for `assertions_on_constants` and `unnecessary_operation`.
    bors committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    c412528 View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2024

  1. Fix into_iter_without_iter false positive when the implementation i…

    …s not within the first `impl` block
    astra90x committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    567bea2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ba05b76 View commit details
    Browse the repository at this point in the history
  3. Fix formatting

    astra90x committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    0dd8b27 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f715bfc View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#13029 - tesuji:minimal, r=flip1995

    build: Skip installing rust-docs with minimal rustup profile
    
    r? `@flip1995`
    
    changelog: none
    bors committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    c4f81d0 View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#13030 - astra-90:master, r=Alexendoo

    Fix rust-lang#12964 - false positive with `into_iter_without_iter`
    
    changelog: FP: `into_iter_without_iter`: No longer lints when the `iter` or `iter_mut` implementation is not within the first `impl` block
    
    fixes rust-lang#12964
    
    ---
    
    I'm pretty new to this open-source thing, so hopefully I did everything right. Got a little annoyed this false positive was happening in my code and the issue was inactive for two weeks so I thought I'd fix it myself.
    
    As an aside, maybe `iter.map(...).next()` could be linted against? I don't see that ever being preferred over `iter.next().map(...)`, and it could've prevented the bug here.
    bors committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    6e6683b View commit details
    Browse the repository at this point in the history
  7. Honor avoid-breaking-exported-api in needless_pass_by_ref_mut

    Until now, the lint only emitted a warning, when breaking public API. Now it
    doesn't lint at all when the config value is not set to `false`, bringing it in
    line with the other lints using this config value.
    
    Also ensures that this config value is documented in the lint.
    flip1995 committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    2da0edb View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    125c778 View commit details
    Browse the repository at this point in the history
  9. doc_markdown: detect escaped ` `` when checking unmatched

    Add explanatory comment to complex bounds check
    
    Format
    notriddle authored and blyxyas committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    70c8579 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    cd60231 View commit details
    Browse the repository at this point in the history
  11. Auto merge of rust-lang#13010 - notriddle:notriddle/unbalanced-ticks-…

    …backslash, r=blyxyas
    
    doc_markdown: detect escaped `` ` `` when checking unmatched
    
    ```
    changelog: [`doc_markdown`]: correctly detect backslash-escaped `` ` ``
    ```
    bors committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    3af2005 View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2024

  1. Configuration menu
    Copy the full SHA
    ae47b97 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#11647 - flip1995:needless-pass-by-ref-mut-pub…

    …-api, r=xFrednet
    
    Honor `avoid-breaking-exported-api` in `needless_pass_by_ref_mut`
    
    Until now, the lint only emitted a warning, when breaking public API. Now it doesn't lint at all when the config value is not set to `false`, bringing it in line with the other lints using this config value.
    
    Also ensures that this config value is documented in the lint.
    
    changelog: none
    (I don't think a changelog is necessary, since this lint is in `nursery`)
    
    ---
    
    Fixes rust-lang/rust-clippy#11374
    
    cc `@GuillaumeGomez`
    
    Marking as draft: Does this lint even break public API? If I change a function signature from `fn foo(x: &mut T)` to `fn foo(x: &T)`, I can still call it with `foo(&mut x)`. The only "breaking" thing is that the `clippy::unnecessary_mut_passed` lint will complain that `&mut` at the callsite is not necessary, possibly trickling down to the crate user having to remote a `mut` from a variable. [Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=058165a7663902e84af1d23e35c10d66).
    
    Are there examples where this actually breaks public API, that I'm missing?
    bors committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    918ae1b View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#125507 - compiler-errors:type-length-limit, r…

    …=lcnr
    
    Re-implement a type-size based limit
    
    r? lcnr
    
    This PR reintroduces the type length limit added in rust-lang#37789, which was accidentally made practically useless by the caching changes to `Ty::walk` in rust-lang#72412, which caused the `walk` function to no longer walk over identical elements.
    
    Hitting this length limit is not fatal unless we are in codegen -- so it shouldn't affect passes like the mir inliner which creates potentially very large types (which we observed, for example, when the new trait solver compiles `itertools` in `--release` mode).
    
    This also increases the type length limit from `1048576 == 2 ** 20` to `2 ** 24`, which covers all of the code that can be reached with craterbot-check. Individual crates can increase the length limit further if desired.
    
    Perf regression is mild and I think we should accept it -- reinstating this limit is important for the new trait solver and to make sure we don't accidentally hit more type-size related regressions in the future.
    
    Fixes rust-lang#125460
    bors committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    b52ac9a View commit details
    Browse the repository at this point in the history
  4. add test 12969 and 9841

    tesuji committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    7b76b94 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    388de38 View commit details
    Browse the repository at this point in the history
  6. Fix 12969 and fix 9841

    tesuji committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    c4c41d1 View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#12976 - tesuji:fix-explicit_auto_deref, r=xFr…

    …ednet
    
    Fix some false-positive cases of `explicit_auto_deref`
    
    changelog: [`explicit_auto_deref`] Fix some false-positive cases
    
    Fix part of rust-lang#9841
    Fix  rust-lang#12969
    
    r? xFrednet
    bors committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    0f4035f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    0f915f6 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    6661e83 View commit details
    Browse the repository at this point in the history
  10. Fix typos

    lochetti committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    eff6f68 View commit details
    Browse the repository at this point in the history
  11. Small fix after rebase

    lochetti committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    4e71fc4 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    903874d View commit details
    Browse the repository at this point in the history
  13. Auto merge of rust-lang#13027 - xFrednet:12998-expect-returns, r=Jarcho

    `needless_return`: Support `#[expect]` on the return statement
    
    A fix for rust-lang/rust-clippy#9361 suppresses `clippy::needless_return` if there are any attributes on the `return` statement. This leads to some unexpected behavior, as described in rust-lang/rust-clippy#12998, where adding `#[expect(clippy::needless_return)]` suppresses the lint, but doesn't fulfill the expectation.
    
    I now decided to manually fulfill any expectations, if they are before the attribute check.
    
    ---
    
    Closes: rust-lang/rust-clippy#12998
    
    changelog: none
    bors committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    a4bdab3 View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2024

  1. Auto merge of rust-lang#127127 - notriddle:notriddle/pulldown-cmark-0…

    ….11, r=GuillaumeGomez
    
    rustdoc: update to pulldown-cmark 0.11
    
    r? rustdoc
    
    This pull request updates rustdoc to the latest version of pulldown-cmark. Along with adding new markdown extensions (which this PR doesn't enable), the new pulldown-cmark version also fixes a large number of bugs. Because all text files successfully parse as markdown, these bugfixes change the output, which can break people's existing docs.
    
    A crater run, rust-lang#121659, has already been run for this change.
    
    The first commit upgrades and fixes rustdoc. The second commit adds a lint for the footnote and block quote parser changes, which break the largest numbers of docs in the Crater run. The strikethrough change was mitigated in pulldown-cmark itself.
    
    Unblocks rust-lang/rust-clippy#12876
    bors committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    2440075 View commit details
    Browse the repository at this point in the history
  2. Properly handle removal suggestion rendering

    Do not leave a `+ ` line with only whitespace. In reality, the user will want to remove the entire line.
    estebank committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    9b7227c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    378962f View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#12873 - lochetti:issue_11103, r=llogiq

    Add new lint `hashset_insert_after_contains`
    
    This PR closes rust-lang/rust-clippy#11103.
    
    This is my first PR creating a new lint (and the second attempt of creating this PR, the first one I was not able to continue because of personal reasons). Thanks for the patience :)
    
    The idea of the lint is to find insert in hashmanps inside if staments that are checking if the hashmap contains the same value that is being inserted. This is not necessary since you could simply call the insert and check for the bool returned if you still need the if statement.
    
    changelog: new lint: [hashset_insert_after_contains]
    bors committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    d2400a4 View commit details
    Browse the repository at this point in the history
  5. [missing_const_for_fn]: fix suggestions for fn with abi that requir…

    …es `const_extern_fn` feature
    J-ZhengLi committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    3a71223 View commit details
    Browse the repository at this point in the history
  6. New Lint: byte_char_slices

    This patch adds a new lint that checks for potentially harder to read
    byte char slices: `&[b'a', b'b']` and suggests to replace them with the
    easier to read `b"ab"` form.
    
    Signed-Off-By: Marcel Müller <m.mueller@ifm.com>
    Co-authored-by: Matthias Beyer <matthias.beyer@ifm.com>
    
    Use iterator to skip validation
    
    Signed-off-by: Marcel Müller <m.mueller@ifm.com>
    Suggested-by: Alex Macleod <alex@macleod.io>
    
    Convert quote escapes to proper form
    
    Signed-off-by: Marcel Müller <m.mueller@ifm.com>
    
    Add more convertable test cases
    
    Signed-off-by: Marcel Müller <m.mueller@ifm.com>
    TheNeikos authored and xFrednet committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    88c4a22 View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#10155 - TheNeikos:feature/add_byte_char_slice…

    …_lint, r=Manishearth
    
    Add new lint for byte char slices
    
    This patch adds a new lint that checks for potentially harder to read byte char slices: `&[b'a', b'b']` and suggests to replace them with the easier to read `b"ab"` form.
    
    Fixes rust-lang#10147
    
    ---
    
    changelog: new lint: [`byte_char_slices`]
    [rust-lang#10155](rust-lang/rust-clippy#10155)
    <!-- changelog_checked -->
    bors committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    2b01d69 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#127301 - estebank:fix-suggestions, r=Urgau

    Tweak some structured suggestions to be more verbose and accurate
    
    Addressing some issues I found while working on rust-lang#127282.
    ```
    error: this URL is not a hyperlink
      --> $DIR/auxiliary/include-str-bare-urls.md:1:11
       |
    LL | HEADS UP! https://example.com MUST SHOW UP IN THE STDERR FILE!
       |           ^^^^^^^^^^^^^^^^^^^
       |
       = note: bare URLs are not automatically turned into clickable links
    note: the lint level is defined here
      --> $DIR/include-str-bare-urls.rs:14:9
       |
    LL | #![deny(rustdoc::bare_urls)]
       |         ^^^^^^^^^^^^^^^^^^
    help: use an automatic link instead
       |
    LL | HEADS UP! <https://example.com> MUST SHOW UP IN THE STDERR FILE!
       |           +                   +
    ```
    ```
    error[E0384]: cannot assign twice to immutable variable `v`
      --> $DIR/assign-imm-local-twice.rs:7:5
       |
    LL |     v = 1;
       |     ----- first assignment to `v`
    LL |     println!("v={}", v);
    LL |     v = 2;
       |     ^^^^^ cannot assign twice to immutable variable
       |
    help: consider making this binding mutable
       |
    LL |     let mut v: isize;
       |         +++
    ```
    ```
    error[E0393]: the type parameter `Rhs` must be explicitly specified
      --> $DIR/issue-22560.rs:9:23
       |
    LL | trait Sub<Rhs=Self> {
       | ------------------- type parameter `Rhs` must be specified for this
    ...
    LL | type Test = dyn Add + Sub;
       |                       ^^^
       |
       = note: because of the default `Self` reference, type parameters must be specified on object types
    help: set the type parameter to the desired type
       |
    LL | type Test = dyn Add + Sub<Rhs>;
       |                          +++++
    ```
    ```
    error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable
      --> $DIR/issue-33819.rs:4:34
       |
    LL |         Some(ref v) => { let a = &mut v; },
       |                                  ^^^^^^ cannot borrow as mutable
       |
    help: try removing `&mut` here
       |
    LL -         Some(ref v) => { let a = &mut v; },
    LL +         Some(ref v) => { let a = v; },
       |
    ```
    ```
    help: remove the invocation before committing it to a version control system
       |
    LL -     dbg!();
       |
    ```
    ```
    error[E0308]: mismatched types
      --> $DIR/issue-39974.rs:1:21
       |
    LL | const LENGTH: f64 = 2;
       |                     ^ expected `f64`, found integer
       |
    help: use a float literal
       |
    LL | const LENGTH: f64 = 2.0;
       |                      ++
    ```
    ```
    error[E0529]: expected an array or slice, found `Vec<i32>`
      --> $DIR/match-ergonomics.rs:8:9
       |
    LL |         [&v] => {},
       |         ^^^^ pattern cannot match with input type `Vec<i32>`
       |
    help: consider slicing here
       |
    LL |     match x[..] {
       |            ++++
    ```
    ```
    error[E0609]: no field `0` on type `[u32; 1]`
      --> $DIR/parenthesized-deref-suggestion.rs:10:21
       |
    LL |     (x as [u32; 1]).0;
       |                     ^ unknown field
       |
    help: instead of using tuple indexing, use array indexing
       |
    LL |     (x as [u32; 1])[0];
       |                    ~ +
    ```
    matthiaskrgr authored Jul 4, 2024
    Configuration menu
    Copy the full SHA
    4d26177 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    5b30f6a View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2024

  1. Auto merge of rust-lang#13037 - J-ZhengLi:issue13008, r=llogiq

    [`missing_const_for_fn`]: fix suggestions for fn with abi that requires `const_extern_fn` feature
    
    closes: rust-lang#13008
    
    ---
    
    changelog: [`missing_const_for_fn`]: fix suggestions for fn with abi that requires `const_extern_fn` feature.
    bors committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    0aac16e View commit details
    Browse the repository at this point in the history
  2. Refactor assigning_clones:

    * Merge some code paths
    * Use `find` instead of a loop
    * Move macro check to after hir pattern matching
    Jarcho committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    d9ab0a7 View commit details
    Browse the repository at this point in the history
  3. Refactor bool_to_int_with_if:

    * Check hir structure before macro checks
    * Simplify constant checking
    Jarcho committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    9d8a177 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#11656 - y21:unnecessary_string_from_utf8, r=J…

    …archo
    
    [`unnecessary_to_owned`]: catch `to_owned` on byte slice to create temporary `&str`
    
    Closes rust-lang#11648
    
    Detects the pattern `&String::from_utf8(bytes.to_vec()).unwrap()` and suggests `core::str::from_utf8(bytes).unwrap()`, which avoids the unnecessary intermediate allocation.
    
    I decided to put this in the existing `unnecessary_to_owned` lint (rather than creating a new lint) for a few reasons:
    - we get to use some of its logic (for example, recognizing any of the functions in the `to_owned` family, e.g. `to_vec`)
    - the actual inefficient operation that can be avoided here is the call to `.to_vec()`, so this is in a way similar to the other cases caught by `unnecessary_to_owned`, just through a bunch of type conversions
    - we can make this more "generic" later and catch other cases, so imo it's best not to tie this lint specifically to the `String` type
    
    changelog: [`unnecessary_to_owned`]: catch `&String::from_utf8(bytes.to_vec()).unwrap()` and suggest `core::str::from_utf8(bytes).unwrap()`
    bors committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    885f97e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ac939ad View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4c44b4e View commit details
    Browse the repository at this point in the history
  7. Refactor disallowed_methods:

    * Simplify `def_id` extraction.
    * Use the span of the method name instead of the call.
    Jarcho committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    60af258 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    6d61bda View commit details
    Browse the repository at this point in the history
  9. Auto merge of rust-lang#13047 - Jarcho:script, r=y21

    Refactor `disallowed_script_idents`
    
    Minor change to use `find_map` instead of a loop. Not important, but it's easier to read.
    
    changelog: none
    bors committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    e7f2952 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    2c09ac3 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    dd37441 View commit details
    Browse the repository at this point in the history
  12. Auto merge of rust-lang#13049 - Jarcho:is_in_test, r=Alexendoo

    Remove `is_in_test_module_or_function`
    
    Uses are replaced with `is_in_test` for consistency with other lints and to simplify the implementation of the lints. This means the module name is no longer checked, but that was a horrible hack from a time when late passes couldn't see `#[cfg(..)]` attributes.
    
    changelog: none
    bors committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    3ef3667 View commit details
    Browse the repository at this point in the history
  13. Auto merge of rust-lang#11293 - mrnossiom:11234, r=Jarcho

    feat: add cfg_not_test lint
    
    <!--
    - \[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`
    - \[ ] Added lint documentation
    - \[x] Run `cargo dev fmt`
    
    [lint_naming]: https://rust-lang.github.io/rfcs/0344-conventions-galore.html#lints
    -->
    
    Fixes rust-lang#11234
    
    changelog: new lint: [`cfg_not_test`]
    
    I don't know whether to lint only the `attr` or also the item associated to it. I guess this would mean putting the check in another place than `check_attribute` but I can't find a way to get the associated item to the attribute.
    
    Also, I'm not sure how to document this lint, I feel like my explications are bad.
    bors committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    94a000b View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    6621e6c View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    25bb612 View commit details
    Browse the repository at this point in the history
  16. Auto merge of rust-lang#12974 - alex-semenyuk:rename_thread_local_ini…

    …tializer_can_be_made_const, r=Alexendoo
    
    Rename thread_local_initializer_can_be_made_const to missing_const_for_thread_local
    
    Close rust-lang#12934
    As discussed at rust-lang#12934 name `thread_local_initializer_can_be_made_const` sounds against convention for other lints which describe the issue/wrong code but not suggestion and it is quite long. The new name take example from existing lint `missing_const_for_fn`
    
    changelog: `thread_local_initializer_can_be_made_const` : Rename to [`missing_const_for_thread_local`]
    bors committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    3ed690f View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    ecbb2d7 View commit details
    Browse the repository at this point in the history

Commits on Jul 6, 2024

  1. Rename any_parent_is_automatically_derived to `in_automatically_der…

    …ived`. Only check for the attribute on an impl block.
    Jarcho committed Jul 6, 2024
    Configuration menu
    Copy the full SHA
    d8fb164 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#13055 - Jarcho:auto_derive, r=Alexendoo

    Only check for `automatically_derived` on impl blocks
    
    This brings us in line with how rustc checks for the attribute. Also note that `unused_attributes` will trigger if it's placed anywhere else.
    
    See:
    https://github.com/rust-lang/rust/blob/9a21ac8e7efe9ea26a8065d0959a976ca32039bb/compiler/rustc_passes/src/dead.rs#L400-L403
    https://github.com/rust-lang/rust/blob/9a21ac8e7efe9ea26a8065d0959a976ca32039bb/compiler/rustc_passes/src/liveness.rs#L143-L148
    
    changelog: none
    bors committed Jul 6, 2024
    Configuration menu
    Copy the full SHA
    0c9016a View commit details
    Browse the repository at this point in the history
  3. Mark format! with must_use hint

    lukas committed Jul 6, 2024
    Configuration menu
    Copy the full SHA
    e0f32e0 View commit details
    Browse the repository at this point in the history

Commits on Jul 7, 2024

  1. Configuration menu
    Copy the full SHA
    7ce4a49 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f7050b0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5a9e5e4 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#12966 - Rudxain:patch-1, r=dswij

    Clarify that `modulo_one` only applies to ints
    
    changelog: [`modulo_one`]: (docs) Clarify that it only applies to integers
    
    This might be nitpicky, but it's more technically correct.
    
    It also helps if a user skims through the docs, because they may believe it also applies to `{float}`s. This doc edit minimizes that possibility
    bors committed Jul 7, 2024
    Configuration menu
    Copy the full SHA
    f2c74e2 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    aa371c3 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    23d96f6 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d2ff2b9 View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#13048 - Jarcho:disallowed_methods, r=blyxyas

    Refactor `disallowed_methods` and narrow span
    
    Using the span of the call site just produces noisy diagnostics for long calls. Especially multi-line calls.
    
    changelog: none
    bors committed Jul 7, 2024
    Configuration menu
    Copy the full SHA
    09c07ed View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    791ff40 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    93e74a4 View commit details
    Browse the repository at this point in the history
  11. Auto merge of rust-lang#13052 - xFrednet:00000-lintcheck-warn-all, r=…

    …Alexendoo
    
    Lintcheck: Add `--warn-all` and make it the CI default
    
    This PR adds a new `--warn-all` flag to lintcheck. This is intended for our CI, as it currently doesn't detect changes of `nursery` and `restriction` lints.
    
    I only made it the default for the CI, as `restriction` lints tend to generate A LOT of lint triggers. Looking at you [`clippy::implicit_return`](https://rust-lang.github.io/rust-clippy/master/index.html#/clippy::implicit_return)
    
    That's it. Should hopefully be easy to review.
    
    Also, a bit thanks again to `@Alexendoo` for adding this to our CI ❤️
    
    ---
    
    r? `@Alexendoo`
    
    changelog: none
    bors committed Jul 7, 2024
    Configuration menu
    Copy the full SHA
    a413281 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    8e2ddc8 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    dc8403f View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    aef0710 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    ca5c281 View commit details
    Browse the repository at this point in the history
  16. iter_not_returning_iterator:

    * Check HIR tree first.
    * Check name by symbol.
    Jarcho committed Jul 7, 2024
    Configuration menu
    Copy the full SHA
    fa1a690 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    6b10b43 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    3092c8a View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    430c02c View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    c3dd028 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    03036c1 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    5ae33c7 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    eac1aab View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    ff4e62d View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    fed75b3 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    5332def View commit details
    Browse the repository at this point in the history
  27. let_with_type_underscore:

    * Delay macro check.
    * Use `is_from_proc_macro
    Jarcho committed Jul 7, 2024
    Configuration menu
    Copy the full SHA
    15f640a View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    c0fa6a9 View commit details
    Browse the repository at this point in the history
  29. manual_bits: Delay msrv check

    Jarcho committed Jul 7, 2024
    Configuration menu
    Copy the full SHA
    b9ba340 View commit details
    Browse the repository at this point in the history
  30. manual_float_methods:

    * Check HIR tree first.
    * Use `partition_in_place`.
    Jarcho committed Jul 7, 2024
    Configuration menu
    Copy the full SHA
    95348ad View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    2d9e67e View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    f46c981 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    2309f8e View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    44f87e8 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    0f4cd13 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    0311702 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    c0068ba View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    5d333e8 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    7a942a5 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    488a545 View commit details
    Browse the repository at this point in the history
  41. minmax: use let chain

    Jarcho committed Jul 7, 2024
    Configuration menu
    Copy the full SHA
    eda45aa View commit details
    Browse the repository at this point in the history

Commits on Jul 8, 2024

  1. Rework init_numbered_fields:

    * Only check the name of a single field
    * Don't lint in macros
    * Check for side effects
    * Don't use a binary heap
    Jarcho committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    5b7ffa1 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#13068 - Jarcho:init_numbered, r=Alexendoo

    Rework `init_numbered_fields`
    
    Two behaviour changes:
    * Not linting in macros
    * Not linting when side effects might be reordered
    
    changelog: `init_numbered_fields`: Don't suggest reordering side effects.
    bors committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    1de41b1 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#113128 - WaffleLapkin:become_trully_unuwuable…

    …, r=oli-obk,RalfJung
    
    Support tail calls in mir via `TerminatorKind::TailCall`
    
    This is one of the interesting bits in tail call implementation — MIR support.
    
    This adds a new `TerminatorKind` which represents a tail call:
    ```rust
        TailCall {
            func: Operand<'tcx>,
            args: Vec<Operand<'tcx>>,
            fn_span: Span,
        },
    ```
    
    *Structurally* this is very similar to a normal `Call` but is missing a few fields:
    - `destination` — tail calls don't write to destination, instead they pass caller's destination to the callee (such that eventual `return` will write to the caller of the function that used tail call)
    - `target` — similarly to `destination` tail calls pass the caller's return address to the callee, so there is nothing to do
    - `unwind` — I _think_ this is applicable too, although it's a bit confusing
    - `call_source` — `become` forbids operators and is not created as a lowering of something else; tail calls always come from HIR (at least for now)
    
    It might be helpful to read the interpreter implementation to understand what `TailCall` means exactly, although I've tried documenting it too.
    
    -----
    
    There are a few `FIXME`-questions still left, ideally we'd be able to answer them during review ':)
    
    -----
    
    r? `@oli-obk`
    cc `@scottmcm` `@DrMeepster` `@JakobDegen`
    bors committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    1e3f8c6 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#127476 - jieyouxu:rollup-16wyb0b, r=jieyouxu

    Rollup of 10 pull requests
    
    Successful merges:
    
     - rust-lang#126841 ([`macro_metavar_expr_concat`] Add support for literals)
     - rust-lang#126881 (Make `NEVER_TYPE_FALLBACK_FLOWING_INTO_UNSAFE` a deny-by-default lint in edition 2024)
     - rust-lang#126921 (Give VaList its own home)
     - rust-lang#127367 (Run alloc sync tests)
     - rust-lang#127431 (Use field ident spans directly instead of the full field span in diagnostics on local fields)
     - rust-lang#127437 (Uplift trait ref is knowable into `rustc_next_trait_solver`)
     - rust-lang#127439 (Uplift elaboration into `rustc_type_ir`)
     - rust-lang#127451 (Improve `run-make/output-type-permutations` code and improve `filename_not_in_denylist` API)
     - rust-lang#127452 (Fix intrinsic const parameter counting with `effects`)
     - rust-lang#127459 (rustdoc-json: add type/trait alias tests)
    
    r? `@ghost`
    `@rustbot` modify labels: rollup
    bors committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    e82cfdc View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    08992d0 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#127355 - aceArt-GmbH:126475, r=oli-obk

    Mark format! with must_use hint
    
    Uses unstable feature rust-lang#94745
    
    Part of rust-lang#126475
    
    First contribution to rust, please let me know if the blessing of tests is correct
    Thanks `@bjorn3` for the help
    matthiaskrgr authored Jul 8, 2024
    Configuration menu
    Copy the full SHA
    a988389 View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#13045 - J-ZhengLi:missing_const_for_fn_FP, r=…

    …blyxyas
    
    [`missing_const_for_fn`]: fix FP when arg ty is impl trait alias ty
    
    closes: rust-lang#13009
    
    ---
    
    changelog: [`missing_const_for_fn`]: fix FP when arg ty is impl trait alias ty
    bors committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    2ad8cdc View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#13064 - Alexendoo:lintcheck-shrink-json, r=xF…

    …rednet
    
    Reduce the size of lintcheck JSON output
    
    Saves about 80% of the size by picking out what we need rather than serialising the whole diagnostic
    
    r? `@xFrednet`
    
    changelog: none
    bors committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    edc6b00 View commit details
    Browse the repository at this point in the history
  9. Auto merge of rust-lang#12870 - lrh2000:sig-drop-while, r=blyxyas

    `significant_drop_in_scrutinee`: Trigger lint also for scrutinees in `while let` and `if let`
    
    This lint should also work for `if let` and `while let`, so this PR makes it actually work.
    
    For `while let`, I can't think of any reason why this lint shouldn't be enabled. The only problem is that the lint suggests moving the significant drop above the `while let`, which is clearly invalid in the case of `while let`. I don't know if this is fixable, but this PR simply disables the wrong suggestions.
    
    For `if let`, it seems that another lint called `if_let_mutex` has some overlapping functionality. But `significant_drop_in_scrutinee` is a bit stricter, as it will trigger even if the `else` branch does not try to lock the same mutex.
    
    changelog: [`significant_drop_in_scrutinee`]: Trigger lint also for scrutinees in `while let` and `if let`.
    
    r? `@blyxyas` (the third PR as promised in rust-lang/rust-clippy#12740 (comment), thanks for your review!)
    bors committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    dfb9253 View commit details
    Browse the repository at this point in the history
  10. Auto merge of rust-lang#13067 - Jarcho:misc_small3, r=Manishearth

    Misc refactorings part 3
    
    And some more changes. Same general idea of checking the HIR tree first when linting.
    
    changelog: none
    bors committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    510cfe3 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    d23df74 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    920cbcd View commit details
    Browse the repository at this point in the history
  13. Auto merge of rust-lang#13042 - Jarcho:almost_range, r=Manishearth

    `almost_complete_range`: Delay suggestion creation.
    
    Does less work when the lint doesn't trigger.
    
    changelog: none
    bors committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    f6020fb View commit details
    Browse the repository at this point in the history
  14. Auto merge of rust-lang#13043 - Jarcho:assign_clone, r=Manishearth

    Refactor `assigning_clones`
    
    Short list of changes:
    * Inline and simplify `extract_call`
    * Inline `is_ok_to_suggest`
    * Inline `skip_drop_block`
    * Check the HIR tree before the macro check
    * Don't call `outer_expn_data`
    * Use `find` instead of a loop in `clone_source_borrows_from_dest`
    
    changelog: none
    bors committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    058e6ea View commit details
    Browse the repository at this point in the history
  15. Auto merge of rust-lang#13044 - Jarcho:bool_int, r=Manishearth

    Refactor `bool_to_int_with_if`
    
    Rearranges things to check the HIR tree first and simplifies how the literals are read.
    
    changelog: None
    bors committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    e64236c View commit details
    Browse the repository at this point in the history
  16. Auto merge of rust-lang#13056 - y21:rm-compiler-lint-functions, r=Man…

    …ishearth
    
    Remove internal `compiler_lint_functions` lint
    
    This internal lint has effectively been superseded by `disallowed_methods` when we started using that in rust-lang#11811 (I didn't even know that we also had this internal lint at the time of when I created that PR).
    
    Some of the methods that this looks for also don't exist anymore (`span_lint_note` and `span_lint_help`), though there was one that that lint had but wasn't disallowed in clippy.toml (`LintContext::lint`)
    
    changelog: none
    bors committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    87f8a5b View commit details
    Browse the repository at this point in the history

Commits on Jul 9, 2024

  1. Replace incorrect suggested fix for float_cmp

    Using `f32::EPSILON` or `f64::EPSILON` as the floating-point equality comparison error margin is incorrect, yet `float_cmp` has until now recommended this be done. This change fixes the given guidance (both in docs and compiler hints) to not reference these unsuitable constants.
    
    Instead, the guidance now clarifies that the scenarios in which an absolute error margin is usable, provides a reference implementation of using a user-defined absolute error margin (as an absolute error margin can only be used-defined and may be different for different comparisons) and references the floating point guide for a reference implementation of relative error based equaltiy comparison for when absolute error margin cannot be used.
    
    changelog: Fix guidance of [`float_cmp`] and [`float_cmp_const`] to not incorrectly recommend `f64::EPSILON` as the error margin.
    
    Fixes rust-lang#6816
    sandersaares committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    a067cd2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a04dbb0 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#13069 - Jarcho:misc_small4, r=Manishearth

    Misc refactorings part 4
    
    And even more rearrangements to check the HIR tree before other checks.
    
    changelog: none
    bors committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    8fa406b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c3a2406 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#13080 - xFrednet:00000-lintcheck-mv-stuff-and…

    …-things, r=Alexendoo
    
    Lintcheck: Refactor structs and only take one version per crate
    
    For some time now I had the feeling that lintcheck's main file has been too large. This PR simply moves some structs into new submodules.
    
    I've also changed the `.toml` structure slightly to only accept one version per crate. AFAIK, we haven't use multiple versions before. If we want to test different versions, we can simply just add a second entry. That's what lintcheck does internally anyways.
    
    I wanted to have these changes in separate commits, but then accidentally squashed them... So sorry 😅
    
    ---
    
    r? `@Alexendoo` If you think this is not really worth a proper review, since it's mostly a move refactoring in an internal tool, you can also `r=xFrednet` on this PR.
    
    changelog: none
    bors committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    279494e View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2024

  1. Configuration menu
    Copy the full SHA
    e42a380 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#13079 - sandersaares:u/sasaares/no-epsilon-gu…

    …idance, r=y21
    
    Fix guidance of [`float_cmp`] and [`float_cmp_const`] to not incorrectly recommend `f__::EPSILON` as the error margin.
    
    Using `f32::EPSILON` or `f64::EPSILON` as the floating-point equality comparison error margin is incorrect, yet `float_cmp` has until now recommended this be done. This change fixes the given guidance (both in docs and compiler hints) to not reference these unsuitable constants.
    
    Instead, the guidance now clarifies that the scenarios in which an absolute error margin is usable, provides a sample implementation for using a user-defined absolute error margin (as an absolute error margin can only be used-defined and may be different for different comparisons) and references the floating point guide for a reference implementation of relative error based equality comparison for cases where absolute error margins cannot be identified.
    
    changelog: [`float_cmp`] Fix guidance to not incorrectly recommend `f__::EPSILON` as the error margin.
    changelog: [`float_cmp_const`] Fix guidance to not incorrectly recommend `f__::EPSILON` as the error margin.
    
    Fixes rust-lang#6816
    bors committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    ab7c910 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#12944 - Jarcho:overflow_check, r=y21

    Fix and rename `overflow_check_conditional`
    
    fixes rust-lang#2457
    
    Other changes:
    * Limit the lint to unsigned types.
    * Actually check if the operands are the same rather than using only the first part of the path.
    * Allow the repeated expression to be anything as long as there are no side effects.
    
    changelog: Rename `overflow_check_conditional` to `panicking_overflow_check` and move to `correctness`
    bors committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    b012421 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a987c30 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#12984 - bitfield:fix_doc_nits_c, r=Alexendoo

    Fix doc nits
    
    More tender love and polish for the documentation and suggestion texts: adding formatting, links, full stops, tweaking wording for readability, changing 'which' to 'that' where appropriate, and other standard copyediting changes.
    
    changelog: Docs [ `await_holding_lock` ]: fix doc nits
    changelog: Docs [ `await_holding_refcell_ref` ]: fix doc nits
    changelog: Docs [ `await_holding_invalid_type` ]: fix doc nits
    changelog: Docs [ `cast_precision_loss` ]: fix doc nits
    changelog: Docs [ `cast_sign_loss` ]: fix doc nits
    changelog: Docs [ `cast_possible_truncation` ]: fix doc nits
    changelog: Docs [ `cast_possible_wrap` ]: fix doc nits
    changelog: Docs [ `cast_lossless` ]: fix doc nits
    changelog: Docs [ `unnecessary_cast` ]: fix doc nits
    changelog: Docs [ `cast_ptr_alignment` ]: fix doc nits
    changelog: Docs [ `fn_to_numeric_cast` ]: fix doc nits
    changelog: Docs [ `fn_to_numeric_cast_with_truncation` ]: fix doc nits
    changelog: Docs [ `fn_to_numeric_cast_any` ]: fix doc nits
    changelog: Docs [ `char_lit_as_u8` ]: fix doc nits
    changelog: Docs [ `ptr_as_ptr` ]: fix doc nits
    changelog: Docs [ `ptr_cast_constness` ]: fix doc nits
    changelog: Docs [ `as_ptr_cast_mut` ]: fix doc nits
    changelog: Docs [ `little_endian_bytes` ]: fix doc nits
    changelog: Docs [ `big_endian_bytes` ]: fix doc nits
    changelog: Docs [ `bind_instead_of_map` ]: fix doc nits
    changelog: Docs [ `same_name_method` ]: fix doc nits
    bors committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    8d3b1f9 View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#13081 - GuillaumeGomez:fix-iter_next_loop.rs,…

    … r=y21
    
    Fix `iter_next_loop.rs` ui test
    
    I'm uncovering bugs while working on rust-lang/rust-clippy#11421. ^^'
    
    changelog: none
    bors committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    ef3cfaa View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2024

  1. Configuration menu
    Copy the full SHA
    1ced73e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3b1266c View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#13086 - flip1995:rustup, r=flip1995

    Rustup
    
    r? `@ghost`
    
    changelog: none
    bors committed Jul 11, 2024
    Configuration menu
    Copy the full SHA
    b794b8e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2ed6ed4 View commit details
    Browse the repository at this point in the history