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

coverage: Don't store a body span in FunctionCoverageInfo #138659

Merged
merged 2 commits into from
Mar 19, 2025

Conversation

Zalathar
Copy link
Contributor

We aren't using this body span for anything truly essential, and having it around will be awkward when we eventually start to support expansion regions, since they aren't necessarily within the main body.

@Zalathar Zalathar added the A-code-coverage Area: Source-based code coverage (-Cinstrument-coverage) label Mar 18, 2025
@rustbot
Copy link
Collaborator

rustbot commented Mar 18, 2025

r? @davidtwco

rustbot has assigned @davidtwco.
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

@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 Mar 18, 2025
@rustbot
Copy link
Collaborator

rustbot commented Mar 18, 2025

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Given that we now only enlarge empty spans to "{" or "}", there shouldn't be
any danger of enlarging beyond a function body.
@Zalathar
Copy link
Contributor Author

Replaced the clever wrapping_sub with an explicit start > 0 (diff).

I tried using checked_sub, but the result always felt too messy, so I landed on this as the non-clever approach.

@oli-obk
Copy link
Contributor

oli-obk commented Mar 18, 2025

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 18, 2025

📌 Commit cc8336b has been approved by oli-obk

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 Mar 18, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 19, 2025
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#136177 (clarify BufRead::{fill_buf, consume} docs)
 - rust-lang#138654 (Remove the regex dependency from coretests)
 - rust-lang#138655 (rustc-dev-guide sync)
 - rust-lang#138656 (Remove double nesting in post-merge workflow)
 - rust-lang#138658 (CI: mirror alpine and centos images to ghcr)
 - rust-lang#138659 (coverage: Don't store a body span in `FunctionCoverageInfo`)
 - rust-lang#138661 (Revert: Add *_value methods to proc_macro lib)
 - rust-lang#138670 (Remove existing AFIDT implementation)
 - rust-lang#138674 (Various codegen_llvm cleanups)
 - rust-lang#138684 (use then in docs for `fuse` to enhance readability)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 00dddc6 into rust-lang:master Mar 19, 2025
6 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Mar 19, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 19, 2025
Rollup merge of rust-lang#138659 - Zalathar:no-body-span, r=oli-obk

coverage: Don't store a body span in `FunctionCoverageInfo`

We aren't using this body span for anything truly essential, and having it around will be awkward when we eventually start to support expansion regions, since they aren't necessarily within the main body.
@Zalathar Zalathar deleted the no-body-span branch March 19, 2025 22:36
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.

None yet

5 participants