Skip to content

[beta] Clippy backport #142725

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

Closed
wants to merge 5 commits into from
Closed

Conversation

flip1995
Copy link
Member

Backports:

This release, we have quite a bit of PRs to backport. The first is the ICE fix. Then we have 2 lints that contradict other existing (rustc) lints. That's a bad user experience, so we rather want to avoid those contradictions on stable. Last but not least, some bug fixes we like to backport. The first one is something the R4L project encountered.

r? @Mark-Simulacrum

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 19, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jun 19, 2025

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@rustbot

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@samueltardieu
Copy link
Contributor

samueltardieu commented Jun 19, 2025

@flip1995 It looks like tests/ui-toml was merged directly into the root instead of inside src/tools/clippy, hence the failure.

This happens in the commit backporting "Don't warn about unloaded crates".

@flip1995
Copy link
Member Author

flip1995 commented Jun 19, 2025

Oh, good catch. Will fix right away

EDIT: Done

Alexendoo and others added 5 commits June 19, 2025 18:39
Fixes
rust-lang/rust-clippy#14397 (comment)

r? @samueltardieu

changelog: Don't warn about clippy.toml disallowed paths for crates that
were not loaded
Closes rust-lang/rust-clippy#14722

changelog: [`collapsible_if`] fix FP on block stmt before expr
changelog: [`transmute_float_to_int, transmute_int_to_char,
transmute_int_to_float`, `transmute_num_to_bytes`]: remove lints, now in
rustc

these lints are now mostly in rustc, so they dont need to be in clippy
anymore

rust-lang#136083 (comment)

pending rust-lang#140431:
transmute_int_to_bool

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_SUMMARY_START -->

- ["Rust version of new lints should be checked" by
@samueltardieu](rust-lang/rust-clippy#14703 (comment))

Generated by triagebot, see
[help](https://forge.rust-lang.org/triagebot/note.html) for how to add
more
<!--
TRIAGEBOT_SUMMARY_DATA_START$${"entries_by_url":{"https://github.com/rust-lang/rust-clippy/pull/14703#issuecomment-2861982576":{"title":"Rust
version of new lints should be
checked","comment_url":"https://github.com/rust-lang/rust-clippy/pull/14703#issuecomment-2861982576","author":"samueltardieu"}}}$$TRIAGEBOT_SUMMARY_DATA_END
-->

<!-- TRIAGEBOT_SUMMARY_END -->
<!-- TRIAGEBOT_END -->
…ust-lang#14810)

Rust 1.88 introduces the `dangerous_implicit_autorefs` lint which warns
about using implicit autorefs on a place obtained from a raw pointer, as
this may create aliasing issues.

Prevent `clippy::needless_borrow` from triggering in this case, by
disabling the lint when taking a reference on a raw pointer dereference.
There might be a better way for doing this in the long run with a finer
way of distinguish the problematic cases, but this will prevent Clippy
from contradicting the compiler in the meantime.

Fixes rust-lang/rust-clippy#14743

changelog: [`needless_borrow`]: do not contradict the compiler's
`dangerous_implicit_autorefs` lint even though the refererences are not
mandatory

@rustbot label +beta-nominated

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_SUMMARY_START -->

### Summary Notes

- [Beta nomination for
1.88](rust-lang/rust-clippy#14810 (comment))
by [samueltardieu](https://github.com/samueltardieu)

Generated by triagebot, see
[help](https://forge.rust-lang.org/triagebot/note.html) for how to add
more
<!--
TRIAGEBOT_SUMMARY_DATA_START$${"entries_by_url":{"https://github.com/rust-lang/rust-clippy/pull/14810#issuecomment-2883753957":{"title":"Beta
nomination for
1.88","comment_url":"https://github.com/rust-lang/rust-clippy/pull/14810#issuecomment-2883753957","author":"samueltardieu"}}}$$TRIAGEBOT_SUMMARY_DATA_END
-->

<!-- TRIAGEBOT_SUMMARY_END -->
<!-- TRIAGEBOT_END -->
The `mir_drops_elaborated_and_const_checked` query result has been
stolen already and cannot be borrowed again. Use the `optimized_mir`
query result instead.

changelog: [`missing_const_for_fn`]: fix ICE with some compilation
options

Fixes rust-lang/rust-clippy#14774

r? @Jarcho
@flip1995 flip1995 force-pushed the clippy-beta-backport branch from 8a4a81a to ccb7161 Compare June 19, 2025 16:40
@rustbot
Copy link
Collaborator

rustbot commented Jun 19, 2025

⚠️ Warning ⚠️

  • There are username mentions (such as @user) in the commit messages of the following commits.
    Please remove the mentions to avoid spamming these users.
  • There are issue links (such as #123) in the commit messages of the following commits.
    Please move them to the PR description, to avoid spamming the issues with references to the commit, and so this bot can automatically canonicalize them to avoid issues with subtree.

@cuviper cuviper mentioned this pull request Jun 20, 2025
@cuviper
Copy link
Member

cuviper commented Jun 20, 2025

I've included this in #142791.

@rustbot label beta-accepted
r? cuviper

@rustbot rustbot added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Jun 20, 2025
@rustbot rustbot assigned cuviper and unassigned Mark-Simulacrum Jun 20, 2025
bors added a commit that referenced this pull request Jun 20, 2025
[beta] backports

- Make the assertion in `Ident::new` debug-only. #140880
- Avoid creating an empty identifer in `Symbol::to_ident_string`. #141318
- Backport rust-lang/stdarch#1818 for 1.88 #142694
- [beta] Clippy backport #142725
    - ICE:
        - rust-lang/rust-clippy#14776
    - Lint contradictions:
        - rust-lang/rust-clippy#14703
        - rust-lang/rust-clippy#14810
    - Smaller (in LoC changes) fixes:
        - rust-lang/rust-clippy#14733
        - rust-lang/rust-clippy#14730

r? cuviper
rust-bors bot added a commit that referenced this pull request Jun 20, 2025
[beta] backports

- Make the assertion in `Ident::new` debug-only. #140880
- Avoid creating an empty identifer in `Symbol::to_ident_string`. #141318
- Backport rust-lang/stdarch#1818 for 1.88 #142694
- [beta] Clippy backport #142725
    - ICE:
        - rust-lang/rust-clippy#14776
    - Lint contradictions:
        - rust-lang/rust-clippy#14703
        - rust-lang/rust-clippy#14810
    - Smaller (in LoC changes) fixes:
        - rust-lang/rust-clippy#14733
        - rust-lang/rust-clippy#14730

r? cuviper

try-job: x86_64-msvc-ext2
bors added a commit that referenced this pull request Jun 21, 2025
[beta] backports

- Make the assertion in `Ident::new` debug-only. #140880
- Avoid creating an empty identifer in `Symbol::to_ident_string`. #141318
- Backport rust-lang/stdarch#1818 for 1.88 #142694
- [beta] Clippy backport #142725
    - ICE:
        - rust-lang/rust-clippy#14776
    - Lint contradictions:
        - rust-lang/rust-clippy#14703
        - rust-lang/rust-clippy#14810
    - Smaller (in LoC changes) fixes:
        - rust-lang/rust-clippy#14733
        - rust-lang/rust-clippy#14730
-  [win][ci] Update LLVM toolchain used to build LLVM to 20 #140757

r? cuviper
@cuviper cuviper closed this Jun 21, 2025
@cuviper cuviper added this to the 1.88.0 milestone Jun 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants