Skip to content

Commit 258b15c

Browse files
committed
Auto merge of #15628 - lnicola:sync-from-rust, r=lnicola
minor: Sync from downstream
2 parents 0566644 + d39b45a commit 258b15c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

crates/hir-def/src/attr/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ pub const INERT_ATTRIBUTES: &[BuiltinAttribute] = &[
240240
template!(List: "address, kcfi, memory, thread"), DuplicatesOk,
241241
experimental!(no_sanitize)
242242
),
243-
gated!(no_coverage, Normal, template!(Word), WarnFollowing, experimental!(no_coverage)),
243+
gated!(coverage, Normal, template!(Word, List: "on|off"), WarnFollowing, experimental!(coverage)),
244244

245245
ungated!(
246246
doc, Normal, template!(List: "hidden|inline|...", NameValueStr: "string"), DuplicatesOk

crates/ide-db/src/generated/lints.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -3505,16 +3505,16 @@ This serves two purposes:
35053505
"##,
35063506
},
35073507
Lint {
3508-
label: "no_coverage",
3509-
description: r##"# `no_coverage`
3508+
label: "coverage",
3509+
description: r##"# `coverage`
35103510
35113511
The tracking issue for this feature is: [#84605]
35123512
35133513
[#84605]: https://github.com/rust-lang/rust/issues/84605
35143514
35153515
---
35163516
3517-
The `no_coverage` attribute can be used to selectively disable coverage
3517+
The `coverage` attribute can be used to selectively disable coverage
35183518
instrumentation in an annotated function. This might be useful to:
35193519
35203520
- Avoid instrumentation overhead in a performance critical function
@@ -3524,14 +3524,14 @@ instrumentation in an annotated function. This might be useful to:
35243524
## Example
35253525
35263526
```rust
3527-
#![feature(no_coverage)]
3527+
#![feature(coverage)]
35283528
35293529
// `foo()` will get coverage instrumentation (by default)
35303530
fn foo() {
35313531
// ...
35323532
}
35333533
3534-
#[no_coverage]
3534+
#[coverage(off)]
35353535
fn bar() {
35363536
// ...
35373537
}

0 commit comments

Comments
 (0)