Skip to content

Commit cb487cc

Browse files
committedDec 17, 2024·
Stabilize #[coverage] attribute
·
1.88.01.85.0
1 parent 13b77c6 commit cb487cc

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

Lines changed: 3 additions & 0 deletions
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

Lines changed: 1 addition & 2 deletions
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.