Skip to content

Conversation

@chenyukang
Copy link
Member

@chenyukang chenyukang commented Feb 3, 2026

Fixes #147339

r? @Zalathar

@rustbot
Copy link
Collaborator

rustbot commented Feb 3, 2026

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Some changes occurred in coverage instrumentation.

cc @Zalathar

@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 Feb 3, 2026
@Zalathar
Copy link
Member

Zalathar commented Feb 3, 2026

Thanks for your efforts.

This fix is not quite right, but it's easier to create my own PR than to explain how to change this one, so I've filed #152039 as a replacement.

@chenyukang chenyukang closed this Feb 3, 2026
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 3, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 3, 2026
…ukang

coverage: Add a test case for a previously-unknown span mismatch

- This is a revised version of rust-lang#152036.
---

In rust-lang#145643, a defensive check was added to detect spans that unexpectedly don't match the context of the function body span. There was no known way to trigger that condition, so a `debug_assert!` was added to make violations easier to notice.

A way to trigger the condition using nested macro expansions was subsequently found and reported as an ICE (in debug-assertion builds) in rust-lang#147339.

Now that we have a concrete example to investigate, we can remove the `debug_assert!` so that there is no ICE in debug-assertion builds.

- Fixes rust-lang#147339.

r? chenyukang
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 3, 2026
…ukang

coverage: Add a test case for a previously-unknown span mismatch

- This is a revised version of rust-lang#152036.
---

In rust-lang#145643, a defensive check was added to detect spans that unexpectedly don't match the context of the function body span. There was no known way to trigger that condition, so a `debug_assert!` was added to make violations easier to notice.

A way to trigger the condition using nested macro expansions was subsequently found and reported as an ICE (in debug-assertion builds) in rust-lang#147339.

Now that we have a concrete example to investigate, we can remove the `debug_assert!` so that there is no ICE in debug-assertion builds.

- Fixes rust-lang#147339.

r? chenyukang
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 3, 2026
…ukang

coverage: Add a test case for a previously-unknown span mismatch

- This is a revised version of rust-lang#152036.
---

In rust-lang#145643, a defensive check was added to detect spans that unexpectedly don't match the context of the function body span. There was no known way to trigger that condition, so a `debug_assert!` was added to make violations easier to notice.

A way to trigger the condition using nested macro expansions was subsequently found and reported as an ICE (in debug-assertion builds) in rust-lang#147339.

Now that we have a concrete example to investigate, we can remove the `debug_assert!` so that there is no ICE in debug-assertion builds.

- Fixes rust-lang#147339.

r? chenyukang
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 3, 2026
…ukang

coverage: Add a test case for a previously-unknown span mismatch

- This is a revised version of rust-lang#152036.
---

In rust-lang#145643, a defensive check was added to detect spans that unexpectedly don't match the context of the function body span. There was no known way to trigger that condition, so a `debug_assert!` was added to make violations easier to notice.

A way to trigger the condition using nested macro expansions was subsequently found and reported as an ICE (in debug-assertion builds) in rust-lang#147339.

Now that we have a concrete example to investigate, we can remove the `debug_assert!` so that there is no ICE in debug-assertion builds.

- Fixes rust-lang#147339.

r? chenyukang
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 3, 2026
…ukang

coverage: Add a test case for a previously-unknown span mismatch

- This is a revised version of rust-lang#152036.
---

In rust-lang#145643, a defensive check was added to detect spans that unexpectedly don't match the context of the function body span. There was no known way to trigger that condition, so a `debug_assert!` was added to make violations easier to notice.

A way to trigger the condition using nested macro expansions was subsequently found and reported as an ICE (in debug-assertion builds) in rust-lang#147339.

Now that we have a concrete example to investigate, we can remove the `debug_assert!` so that there is no ICE in debug-assertion builds.

- Fixes rust-lang#147339.

r? chenyukang
rust-timer added a commit that referenced this pull request Feb 3, 2026
Rollup merge of #152039 - Zalathar:context-mismatch, r=chenyukang

coverage: Add a test case for a previously-unknown span mismatch

- This is a revised version of #152036.
---

In #145643, a defensive check was added to detect spans that unexpectedly don't match the context of the function body span. There was no known way to trigger that condition, so a `debug_assert!` was added to make violations easier to notice.

A way to trigger the condition using nested macro expansions was subsequently found and reported as an ICE (in debug-assertion builds) in #147339.

Now that we have a concrete example to investigate, we can remove the `debug_assert!` so that there is no ICE in debug-assertion builds.

- Fixes #147339.

r? chenyukang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

ICE: span context mismatch

3 participants