Skip to content

Fix ICE in swap_binop()#16659

Merged
Jarcho merged 1 commit into
rust-lang:masterfrom
samueltardieu:issues/16505
Mar 4, 2026
Merged

Fix ICE in swap_binop()#16659
Jarcho merged 1 commit into
rust-lang:masterfrom
samueltardieu:issues/16505

Conversation

@samueltardieu
Copy link
Copy Markdown
Member

@samueltardieu samueltardieu commented Mar 3, 2026

Make swap_binop() a method of HirEqInterExpr, and use the proper typeck to check the type of an expression.

changelog: none (fix of a regression, should be backported)

Fixes #16505

Summary Notes

Managed by @rustbot—see help for details

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Mar 3, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 3, 2026

r? @dswij

rustbot has assigned @dswij.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: 7 candidates
  • 7 candidates expanded to 7 candidates
  • Random selection from Jarcho, dswij, llogiq

@samueltardieu
Copy link
Copy Markdown
Member Author

@rustbot label beta-nominated
@rustbot note Beta-nomination

This should be backported as this is a regression in Rust 1.95 introduced while fixing #16416.

@rustbot rustbot added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Mar 3, 2026
Make `swap_binop()` a method of `HirEqInterExpr`, and use the proper
typeck to check the type of an expression.
Copy link
Copy Markdown
Contributor

@Jarcho Jarcho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jarcho Jarcho added this pull request to the merge queue Mar 4, 2026
Merged via the queue into rust-lang:master with commit b21eb09 Mar 4, 2026
11 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Mar 4, 2026
@samueltardieu samueltardieu deleted the issues/16505 branch March 4, 2026 22:54
@flip1995 flip1995 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 Apr 9, 2026
@flip1995
Copy link
Copy Markdown
Member

flip1995 commented Apr 9, 2026

rust-lang/rust#155051

cuviper pushed a commit to cuviper/rust that referenced this pull request Apr 9, 2026
Make `swap_binop()` a method of `HirEqInterExpr`, and use the proper
typeck to check the type of an expression.

changelog: none (fix of a regression, should be backported)

Fixes rust-lang/rust-clippy#16505

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_SUMMARY_START -->

### Summary Notes

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

*Managed by `@rustbot`—see
[help](https://forge.rust-lang.org/triagebot/note.html) for details*

<!-- TRIAGEBOT_SUMMARY_END -->
<!-- TRIAGEBOT_END -->
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Apr 9, 2026
[beta] reverts and backports

This reverts two `dbg!` changes to avoid regressions[^1][^2] in the upcoming 1.95 release:

- std: avoid tearing `dbg!` prints #149869
- don't drop arguments' temporaries in `dbg!` #154074
  - ... which was previously backported in #154725

This also reverts a stabilization over a late issue[^3] of semantics:

- Stabilize `assert_matches` #137487

And a few other backport/reverts from `main`:

- Revert performing basic const checks in typeck on stable #154930 / #155033
- Revert "`-Znext-solver` Remove the forced ambiguity hack from search graph" #154712
- Clarify that core::range ranges do not have special syntax #155002

Clippy is backporting 2 ICE fixes and 1 perf regression (via #155051):

- rust-lang/rust-clippy#16685 already backported in #154211 to stable. This makes sure that it doesn't regress again in beta/next stable
- rust-lang/rust-clippy#16659 The ICE that is being fixed here was introduced in the 1.95 release cycle
- rust-lang/rust-clippy#16652 Perf regression introduced in the 1.95 release cycle.
  
[^1]: #153850
[^2]: #154988
[^3]: #154406
@flip1995 flip1995 removed the beta-accepted Accepted for backporting to the compiler in the beta channel. label May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clippy crash

5 participants