Auto merge of #15628 - lnicola:sync-from-rust, r=lnicola
minor: Sync from downstream
This commit is contained in:
commit
258b15c506
@ -240,7 +240,7 @@ macro_rules! experimental {
|
|||||||
template!(List: "address, kcfi, memory, thread"), DuplicatesOk,
|
template!(List: "address, kcfi, memory, thread"), DuplicatesOk,
|
||||||
experimental!(no_sanitize)
|
experimental!(no_sanitize)
|
||||||
),
|
),
|
||||||
gated!(no_coverage, Normal, template!(Word), WarnFollowing, experimental!(no_coverage)),
|
gated!(coverage, Normal, template!(Word, List: "on|off"), WarnFollowing, experimental!(coverage)),
|
||||||
|
|
||||||
ungated!(
|
ungated!(
|
||||||
doc, Normal, template!(List: "hidden|inline|...", NameValueStr: "string"), DuplicatesOk
|
doc, Normal, template!(List: "hidden|inline|...", NameValueStr: "string"), DuplicatesOk
|
||||||
|
@ -3505,8 +3505,8 @@ impl at all, but that is not an option for auto traits. A workaround
|
|||||||
"##,
|
"##,
|
||||||
},
|
},
|
||||||
Lint {
|
Lint {
|
||||||
label: "no_coverage",
|
label: "coverage",
|
||||||
description: r##"# `no_coverage`
|
description: r##"# `coverage`
|
||||||
|
|
||||||
The tracking issue for this feature is: [#84605]
|
The tracking issue for this feature is: [#84605]
|
||||||
|
|
||||||
@ -3514,7 +3514,7 @@ impl at all, but that is not an option for auto traits. A workaround
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
The `no_coverage` attribute can be used to selectively disable coverage
|
The `coverage` attribute can be used to selectively disable coverage
|
||||||
instrumentation in an annotated function. This might be useful to:
|
instrumentation in an annotated function. This might be useful to:
|
||||||
|
|
||||||
- Avoid instrumentation overhead in a performance critical function
|
- Avoid instrumentation overhead in a performance critical function
|
||||||
@ -3524,14 +3524,14 @@ impl at all, but that is not an option for auto traits. A workaround
|
|||||||
## Example
|
## Example
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
#![feature(no_coverage)]
|
#![feature(coverage)]
|
||||||
|
|
||||||
// `foo()` will get coverage instrumentation (by default)
|
// `foo()` will get coverage instrumentation (by default)
|
||||||
fn foo() {
|
fn foo() {
|
||||||
// ...
|
// ...
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_coverage]
|
#[coverage(off)]
|
||||||
fn bar() {
|
fn bar() {
|
||||||
// ...
|
// ...
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user