adds feature gating of no_coverage
at either crate- or function-level
This commit is contained in:
parent
888d0b4c96
commit
3a5df48021
13 changed files with 142 additions and 63 deletions
|
@ -649,6 +649,10 @@ declare_features! (
|
|||
/// Allows `extern "wasm" fn`
|
||||
(active, wasm_abi, "1.53.0", Some(83788), None),
|
||||
|
||||
/// Allows function attribute `#[no_coverage]`, to bypass coverage
|
||||
/// instrumentation of that function.
|
||||
(active, no_coverage, "1.53.0", Some(84605), None),
|
||||
|
||||
/// Allows trait bounds in `const fn`.
|
||||
(active, const_fn_trait_bound, "1.53.0", Some(57563), None),
|
||||
|
||||
|
|
|
@ -264,7 +264,6 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
|
|||
|
||||
// Code generation:
|
||||
ungated!(inline, AssumedUsed, template!(Word, List: "always|never")),
|
||||
ungated!(no_coverage, AssumedUsed, template!(Word)),
|
||||
ungated!(cold, AssumedUsed, template!(Word)),
|
||||
ungated!(no_builtins, AssumedUsed, template!(Word)),
|
||||
ungated!(target_feature, AssumedUsed, template!(List: r#"enable = "name""#)),
|
||||
|
@ -274,6 +273,13 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
|
|||
template!(List: "address, memory, thread"),
|
||||
experimental!(no_sanitize)
|
||||
),
|
||||
ungated!(
|
||||
// Not exclusively gated at the crate level (though crate-level is
|
||||
// supported). The feature can alternatively be enabled on individual
|
||||
// functions.
|
||||
no_coverage, AssumedUsed,
|
||||
template!(Word),
|
||||
),
|
||||
|
||||
// FIXME: #14408 assume docs are used since rustdoc looks at them.
|
||||
ungated!(doc, AssumedUsed, template!(List: "hidden|inline|...", NameValueStr: "string")),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue