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

[beta] Clippy backport ICE/infinite loop fix #96740

Closed
wants to merge 2 commits into from

Conversation

flip1995
Copy link
Member

@flip1995 flip1995 commented May 5, 2022

Those commits are picked from the latest Clippy sync: #96735

This fixed the issue rust-lang/rust-clippy#8689

flip1995 added 2 commits May 5, 2022 17:46
This simplifies the visitor code a bit and prevents checking expressions
multiple times. I still think this lint should be removed for now,
because its code isn't really tested.
@rust-highfive
Copy link
Collaborator

Some changes occurred in src/tools/clippy.

cc @rust-lang/clippy

@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive
Copy link
Collaborator

⚠️ Warning ⚠️

  • Pull requests are usually filed against the master branch for this repo, but this one is against beta. Please double check that you specified the right target!

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 5, 2022
@flip1995 flip1995 added the beta-nominated Nominated for backporting to the compiler in the beta channel. label May 6, 2022
@GuillaumeGomez GuillaumeGomez added the A-clippy Area: Clippy label May 10, 2022
@flip1995
Copy link
Member Author

ping @Mark-Simulacrum We'd like to get this in before beta branching tomorrow.

@Mark-Simulacrum
Copy link
Member

The backport needs to be approved by either the clippy team or the compiler team.

Note that Friday is next beta branching, and that doesn't affect backport schedules, so while it's important to get this accepted or not quickly we're not on a rush to do so until beta branch on Friday.

@flip1995
Copy link
Member Author

@rust-lang/clippy This backport moves the only_used_in_recursion lint to nursery and prevents it from running, if not explicitly enabled. I want to backport this infinite loop / ICE fix, because the lint is not really tested well enough and I have the suspicion that we'll see more of those infinite loops with this lint like it currently exists in beta. This infinite loop happens on long method chains and since builder patterns are popular in Rust, we can expect that this will happen often.

This still misses an approval of a Clippy team member and because I don't want to self-approve this, could someone else from the team take another look, please?

@Mark-Simulacrum Mark-Simulacrum added beta-accepted Accepted for backporting to the compiler in the beta channel. and removed beta-nominated Nominated for backporting to the compiler in the beta channel. labels May 13, 2022
@Mark-Simulacrum Mark-Simulacrum added this to the 1.61.0 milestone May 13, 2022
@Mark-Simulacrum
Copy link
Member

Unilaterally approving for backport as we're somewhat pressed for time.

@Mark-Simulacrum
Copy link
Member

Bundled into #97014.

bors added a commit to rust-lang-ci/rust that referenced this pull request May 14, 2022
…ulacrum

[beta] backports

This backports/rolls up:

*  Quick fix for rust-lang#96223. rust-lang#96679
*  [beta] Revert rust-lang#92519 on beta rust-lang#96556
*  [beta] Clippy backport ICE/infinite loop fix rust-lang#96740
*  Revert "Prefer projection candidates instead of param_env candidates for Sized predicates" rust-lang#96593
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-clippy Area: Clippy 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants