Skip to content

Commit 1d35638

Browse files
committedDec 17, 2024
Auto merge of rust-lang#130766 - clarfonthey:stable-coverage-attribute, r=wesleywiser
Stabilize #[coverage] attribute Closes rust-lang#84605, which passed FCP. Stabilisation report here: rust-lang#84605 (comment) Also added to reference here: rust-lang/reference#1628 --- try-job: aarch64-apple try-job: x86_64-gnu try-job: x86_64-msvc
2 parents f23a80a + cb487cc commit 1d35638

File tree

129 files changed

+373
-516
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+373
-516
lines changed
 

‎compiler/rustc_feature/src/accepted.rs

+3
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ declare_features! (
157157
(accepted, const_refs_to_static, "1.83.0", Some(119618)),
158158
/// Allows implementing `Copy` for closures where possible (RFC 2132).
159159
(accepted, copy_closures, "1.26.0", Some(44490)),
160+
/// Allows function attribute `#[coverage(on/off)]`, to control coverage
161+
/// instrumentation of that function.
162+
(accepted, coverage_attribute, "CURRENT_RUSTC_VERSION", Some(84605)),
160163
/// Allows `crate` in paths.
161164
(accepted, crate_in_paths, "1.30.0", Some(45477)),
162165
/// Allows users to provide classes for fenced code block using `class:classname`.

‎compiler/rustc_feature/src/builtin_attrs.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -480,10 +480,9 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
480480
template!(List: "address, kcfi, memory, thread"), DuplicatesOk,
481481
EncodeCrossCrate::No, experimental!(no_sanitize)
482482
),
483-
gated!(
483+
ungated!(
484484
coverage, Normal, template!(OneOf: &[sym::off, sym::on]),
485485
ErrorPreceding, EncodeCrossCrate::No,
486-
coverage_attribute, experimental!(coverage)
487486
),
488487

489488
ungated!(

0 commit comments

Comments
 (0)
Please sign in to comment.