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

Tracking issue for stabilizing the #[coverage(..)] attribute #134749

Open
6 tasks
Zalathar opened this issue Dec 25, 2024 · 0 comments
Open
6 tasks

Tracking issue for stabilizing the #[coverage(..)] attribute #134749

Zalathar opened this issue Dec 25, 2024 · 0 comments
Labels
A-code-coverage Area: Source-based code coverage (-Cinstrument-coverage) C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC

Comments

@Zalathar
Copy link
Contributor

Zalathar commented Dec 25, 2024

This is a sub-issue of #84605 for tracking the remaining obstacles to stabilization of the coverage attribute. The #[coverage(off)] and #[coverage(on)] attributes provide hints for whether -Cinstrument-coverage should instrument a particular function or not.

The feature gate for the issue is #![feature(coverage_attribute)].

About tracking issues

Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Discussion comments will get marked as off-topic or deleted.
Repeated discussions on the tracking issue may lead to the tracking issue getting locked.

Steps

Unresolved Questions

  • Which aspects of the attribute are stably guaranteed vs subject to change?

Implementation history

This functionality was originally introduced as an unstable feature, without a formal RFC. After a period of inactivity, there was a user-led push for stabilization, leading to further design and implementation changes.

A stabilization PR was briefly merged on nightly due to a process mixup, then reverted. This tracking issue picks up after that revert.

@Zalathar Zalathar added A-code-coverage Area: Source-based code coverage (-Cinstrument-coverage) C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC labels Dec 25, 2024
jieyouxu added a commit to jieyouxu/rust that referenced this issue Dec 25, 2024
…ieyouxu

Update `#[coverage(..)]` attribute error messages to match the current implementation

The allowed positions for `#[coverage(..)]` attributes were expanded by rust-lang#126721, but the corresponding error messages were never updated to reflect the new behaviour.

Part of rust-lang#134749.
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Dec 25, 2024
Rollup merge of rust-lang#134750 - Zalathar:coverage-attr-errors, r=jieyouxu

Update `#[coverage(..)]` attribute error messages to match the current implementation

The allowed positions for `#[coverage(..)]` attributes were expanded by rust-lang#126721, but the corresponding error messages were never updated to reflect the new behaviour.

Part of rust-lang#134749.
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) C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC
Projects
None yet
Development

No branches or pull requests

1 participant