Skip to content

Conversation

Zalathar
Copy link
Contributor

@Zalathar Zalathar commented Jul 29, 2025

Regression test for #141577, which was triggered by #144298.

The bug was triggered by a particular usage of the ? try operator in a proc-macro expansion.

Thanks to lqd for the minimization at #144571 (comment).


I have manually verified that reverting the relevant follow-up fixes (#144480 and #144530) causes this test to reproduce the bug:

git revert -m1 8aa3d41b8527f9f78e0f2459b50a6e13aea35144 c462895a6f0b463ff0c1c1db2a3a654d7e5976c7

r? compiler

The bug was triggered by a particular usage of the `?` try operator in a
proc-macro expansion.

Thanks to lqd for the minimization.

Co-authored-by: Rémy Rakic <[email protected]>
@Zalathar Zalathar added the A-code-coverage Area: Source-based code coverage (-Cinstrument-coverage) label Jul 29, 2025
@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 Jul 29, 2025
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

Thanks

@jieyouxu
Copy link
Member

r? jieyouxu @bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jul 29, 2025

📌 Commit 7ca4d1f has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 29, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Jul 29, 2025
coverage: Regression test for "function name is empty" bug

Regression test for rust-lang#141577, which was triggered by rust-lang#144298.

The bug was triggered by a particular usage of the `?` try operator in a proc-macro expansion.

Thanks to lqd for the minimization at rust-lang#144571 (comment).

---

I have manually verified that reverting the relevant follow-up fixes (rust-lang#144480 and rust-lang#144530) causes this test to reproduce the bug:

```sh
git revert -m1 8aa3d41 c462895
```

---

r? compiler
Zalathar added a commit to Zalathar/rust that referenced this pull request Jul 29, 2025
coverage: Regression test for "function name is empty" bug

Regression test for rust-lang#141577, which was triggered by rust-lang#144298.

The bug was triggered by a particular usage of the `?` try operator in a proc-macro expansion.

Thanks to lqd for the minimization at rust-lang#144571 (comment).

---

I have manually verified that reverting the relevant follow-up fixes (rust-lang#144480 and rust-lang#144530) causes this test to reproduce the bug:

```sh
git revert -m1 8aa3d41 c462895
```

---

r? compiler
bors added a commit that referenced this pull request Jul 29, 2025
Rollup of 11 pull requests

Successful merges:

 - #143883 (Add `--link-targets-dir` argument to linkchecker)
 - #144236 (Add `core::mem::DropGuard`)
 - #144303 (Consolidate staging for `rustc_private` tools)
 - #144367 (Move dist-apple-various from x86_64 to aarch64)
 - #144539 (constify with_exposed_provenance)
 - #144569 (rustc-dev-guide subtree update)
 - #144573 (Raw Pointers are Constant PatKinds too)
 - #144575 (fixed typo chunks->as_chunks)
 - #144578 (Ensure correct aligement of rustc_hir::Lifetime on platforms with lower default alignments.)
 - #144582 (fix `Atomic*::as_ptr` wording)
 - #144616 (coverage: Regression test for "function name is empty" bug)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Jul 29, 2025
Rollup of 10 pull requests

Successful merges:

 - #143883 (Add `--link-targets-dir` argument to linkchecker)
 - #144236 (Add `core::mem::DropGuard`)
 - #144367 (Move dist-apple-various from x86_64 to aarch64)
 - #144539 (constify with_exposed_provenance)
 - #144569 (rustc-dev-guide subtree update)
 - #144573 (Raw Pointers are Constant PatKinds too)
 - #144575 (fixed typo chunks->as_chunks)
 - #144578 (Ensure correct aligement of rustc_hir::Lifetime on platforms with lower default alignments.)
 - #144582 (fix `Atomic*::as_ptr` wording)
 - #144616 (coverage: Regression test for "function name is empty" bug)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit cac55bd into rust-lang:master Jul 29, 2025
10 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 29, 2025
rust-timer added a commit that referenced this pull request Jul 29, 2025
Rollup merge of #144616 - Zalathar:try-in-macro, r=jieyouxu

coverage: Regression test for "function name is empty" bug

Regression test for #141577, which was triggered by #144298.

The bug was triggered by a particular usage of the `?` try operator in a proc-macro expansion.

Thanks to lqd for the minimization at #144571 (comment).

---

I have manually verified that reverting the relevant follow-up fixes (#144480 and #144530) causes this test to reproduce the bug:

```sh
git revert -m1 8aa3d41 c462895
```

---

r? compiler
@Zalathar Zalathar deleted the try-in-macro branch July 29, 2025 09:30
Zalathar added a commit to Zalathar/rust that referenced this pull request Jul 31, 2025
coverage: Re-land "Enlarge empty spans during MIR instrumentation"

This allows us to assume that coverage spans will only be discarded during codegen in very unusual situations.

---

This seemingly-simple change has a rather messy history:
- rust-lang#140847
- rust-lang#141650
- rust-lang#144298
- rust-lang#144480

Since then, a number of related changes have landed that should make it reasonable to try again:
- rust-lang#144530
- rust-lang#144560
- rust-lang#144616

In particular, we have multiple fixes/mitigations, and a confirmed regression test for the original bug that is not triggered by re-landing the changes in this PR.
github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Jul 31, 2025
Rollup of 10 pull requests

Successful merges:

 - rust-lang/rust#143883 (Add `--link-targets-dir` argument to linkchecker)
 - rust-lang/rust#144236 (Add `core::mem::DropGuard`)
 - rust-lang/rust#144367 (Move dist-apple-various from x86_64 to aarch64)
 - rust-lang/rust#144539 (constify with_exposed_provenance)
 - rust-lang/rust#144569 (rustc-dev-guide subtree update)
 - rust-lang/rust#144573 (Raw Pointers are Constant PatKinds too)
 - rust-lang/rust#144575 (fixed typo chunks->as_chunks)
 - rust-lang/rust#144578 (Ensure correct aligement of rustc_hir::Lifetime on platforms with lower default alignments.)
 - rust-lang/rust#144582 (fix `Atomic*::as_ptr` wording)
 - rust-lang/rust#144616 (coverage: Regression test for "function name is empty" bug)

r? `@ghost`
`@rustbot` modify labels: rollup
Zalathar added a commit to Zalathar/rust that referenced this pull request Jul 31, 2025
coverage: Re-land "Enlarge empty spans during MIR instrumentation"

This allows us to assume that coverage spans will only be discarded during codegen in very unusual situations.

---

This seemingly-simple change has a rather messy history:
- rust-lang#140847
- rust-lang#141650
- rust-lang#144298
- rust-lang#144480

Since then, a number of related changes have landed that should make it reasonable to try again:
- rust-lang#144530
- rust-lang#144560
- rust-lang#144616

In particular, we have multiple fixes/mitigations, and a confirmed regression test for the original bug that is not triggered by re-landing the changes in this PR.
rust-timer added a commit that referenced this pull request Jul 31, 2025
Rollup merge of #144663 - Zalathar:empty-span, r=petrochenkov

coverage: Re-land "Enlarge empty spans during MIR instrumentation"

This allows us to assume that coverage spans will only be discarded during codegen in very unusual situations.

---

This seemingly-simple change has a rather messy history:
- #140847
- #141650
- #144298
- #144480

Since then, a number of related changes have landed that should make it reasonable to try again:
- #144530
- #144560
- #144616

In particular, we have multiple fixes/mitigations, and a confirmed regression test for the original bug that is not triggered by re-landing the changes in this PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-code-coverage Area: Source-based code coverage (-Cinstrument-coverage) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

5 participants