Skip to content

Fix ICE in match_same_arms#16685

Merged
Jarcho merged 1 commit intorust-lang:masterfrom
samueltardieu:issues/16678
Mar 7, 2026
Merged

Fix ICE in match_same_arms#16685
Jarcho merged 1 commit intorust-lang:masterfrom
samueltardieu:issues/16678

Conversation

@samueltardieu
Copy link
Copy Markdown
Member

@samueltardieu samueltardieu commented Mar 7, 2026

The wrong TypeckResults was used in the fallback equality function passed by the match_same_arms and filter_map lints. Previously, those fallback functions had no way of using the proper TypeckResults. Those (one per expression being compared) are now passed to the registered fallback function.

changelog: [match_same_arms]: fix internal compiler error

Fixes #16678
Fixes #16686

Summary Notes

Managed by @rustbot—see help for details

The wrong `TypeckResults` was used in the fallback equality function
passed by the `match_same_arms` and `filter_map` lints. Previously,
those fallback functions had no way of using the proper `TypeckResults`.
Those (one per expression being compared) are now passed to the
registered fallback function.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Mar 7, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 7, 2026

r? @llogiq

rustbot has assigned @llogiq.
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 is a regression from stable (1.93.1) to stable (1.94.0). This should be propagated to the beta branch for Rust 1.95.0. This should also probably be included if a 1.94.1 point release is made.

@rustbot rustbot added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Mar 7, 2026
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 7, 2026
Merged via the queue into rust-lang:master with commit 9450d56 Mar 7, 2026
15 of 17 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Mar 7, 2026
@samueltardieu samueltardieu deleted the issues/16678 branch March 8, 2026 07:26
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Mar 22, 2026
This applies the patch for that PR, fixing an ICE in match_same_arms.
rust-bors bot pushed a commit to rust-lang/rust that referenced this pull request Mar 22, 2026
[stable] 1.94.1 release


This backports:

* [STABLE] library: wasm32-wasip1-threads has functional pthreads #153634
* Move freeze_* methods to OpenOptionsExt2 #153491
* [Clippy] Fix ICE in match_same_arms rust-lang/rust-clippy#16685

Cargo:

* [stable 1.94] Fix symlink_and_directory when running in a long target dir name (rust-lang/cargo#16777)
* Fix symlink_and_directory when running in a long target dir name (rust-lang/cargo#16775)
* [stable 1.94] Update tar to 0.4.45 (rust-lang/cargo#16769)
* test: Remove unused docker ip_address (rust-lang/cargo#16636)
* Increase cache_lock test timeout (rust-lang/cargo#16545)
* chore: Updated compiler errors for Rust 1.93 (rust-lang/cargo#16543)
* test(build-std): Update error message (rust-lang/cargo#16658)
* fix: `--remap-path-scope` stabilized in 1.95-nightly (rust-lang/cargo#16536)
* fix(script): surpress `unused_features` lint for embedded (rust-lang/cargo#16714)
* test(git): Mark a test as non-deterministic (rust-lang/cargo#16706)
* test(replace): Mark a test as non-deterministic (rust-lang/cargo#16700)
rust-bors bot pushed a commit to rust-lang/rust that referenced this pull request Mar 22, 2026
[stable] 1.94.1 release


This backports:

* [STABLE] library: wasm32-wasip1-threads has functional pthreads #153634
* Move freeze_* methods to OpenOptionsExt2 #153491
* [Clippy] Fix ICE in match_same_arms rust-lang/rust-clippy#16685

Cargo:

* [stable 1.94] Fix symlink_and_directory when running in a long target dir name (rust-lang/cargo#16777)
* Fix symlink_and_directory when running in a long target dir name (rust-lang/cargo#16775)
* [stable 1.94] Update tar to 0.4.45 (rust-lang/cargo#16769)
* test: Remove unused docker ip_address (rust-lang/cargo#16636)
* Increase cache_lock test timeout (rust-lang/cargo#16545)
* chore: Updated compiler errors for Rust 1.93 (rust-lang/cargo#16543)
* test(build-std): Update error message (rust-lang/cargo#16658)
* fix: `--remap-path-scope` stabilized in 1.95-nightly (rust-lang/cargo#16536)
* fix(script): surpress `unused_features` lint for embedded (rust-lang/cargo#16714)
* test(git): Mark a test as non-deterministic (rust-lang/cargo#16706)
* test(replace): Mark a test as non-deterministic (rust-lang/cargo#16700)
CleanCut added a commit to Oxen-AI/Oxen that referenced this pull request Mar 26, 2026
From the [blog
post](https://blog.rust-lang.org/2026/03/26/1.94.1-release/)

## What's in 1.94.1

Rust 1.94.1 resolves three regressions that were introduced in the
1.94.0 release.

- [Fix std::thread::spawn on
wasm32-wasip1-threads](rust-lang/rust#153634)
- [Remove new methods added to
std::os::windows::fs::OpenOptionsExt](rust-lang/rust#153491)
The new methods were unstable, but the trait itself is not sealed and so
cannot be extended with non-default methods.
- [Clippy: fix ICE in
match_same_arms](rust-lang/rust-clippy#16685)
- [Cargo: downgrade curl-sys to
0.4.83](rust-lang/cargo#16787) This fixes
certificate validation error for some users on some versions of FreeBSD.
See [this issue](rust-lang/cargo#16357) for
more details.

And a security fix:

- [Cargo: Update tar to
0.4.45](rust-lang/cargo#16769) This resolves
[CVE-2026-33055](https://www.cve.org/CVERecord?id=CVE-2026-33055) and
[CVE-2026-33056](https://www.cve.org/CVERecord?id=CVE-2026-33056). Users
of crates.io are not affected. See
[blog](https://blog.rust-lang.org/2026/03/21/cve-2026-33056/) for more
details.
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Mar 27, 2026
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [rust](https://github.com/rust-lang/rust) | patch | `1.94.0` → `1.94.1` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>rust-lang/rust (rust)</summary>

### [`v1.94.1`](https://github.com/rust-lang/rust/blob/HEAD/RELEASES.md#Version-1941-2026-03-26)

[Compare Source](rust-lang/rust@1.94.0...1.94.1)

\===========================

<a id="1.94.1"></a>

- [Fix `std::thread::spawn` on wasm32-wasip1-threads](rust-lang/rust#153634)
- [Remove new methods added to `std::os::windows::fs::OpenOptionsExt`](rust-lang/rust#153491)
  The new methods were unstable, but the trait itself is not sealed and so
  cannot be extended with non-default methods.
- [Clippy: fix ICE in `match_same_arms`](rust-lang/rust-clippy#16685)
- [Cargo: update tar to 0.4.45](rust-lang/cargo#16769)
  This resolves CVE-2026-33055 and CVE-2026-33056. Users of crates.io are not affected.
  See [blog](https://blog.rust-lang.org/2026/03/21/cve-2026-33056/) for more details.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My45MS40IiwidXBkYXRlZEluVmVyIjoiNDMuOTEuNCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6OnBhdGNoIl19-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta-nominated Nominated for backporting to the compiler in the beta channel.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(expr sub_reader) cannot be placed in TypeckResults ICE when using a macro to wrap a function in multiple arms of match statement

4 participants