mirror of https://github.com/rust-lang/rust.git
Rename the feature, but not the attribute, to `coverage_attribute`
This commit is contained in:
parent
de1600d110
commit
679267f2ac
|
@ -254,7 +254,7 @@ fn generate_test_harness(
|
||||||
let expn_id = ext_cx.resolver.expansion_for_ast_pass(
|
let expn_id = ext_cx.resolver.expansion_for_ast_pass(
|
||||||
DUMMY_SP,
|
DUMMY_SP,
|
||||||
AstPass::TestHarness,
|
AstPass::TestHarness,
|
||||||
&[sym::test, sym::rustc_attrs, sym::coverage],
|
&[sym::test, sym::rustc_attrs, sym::coverage_attribute],
|
||||||
None,
|
None,
|
||||||
);
|
);
|
||||||
let def_site = DUMMY_SP.with_def_site_ctxt(expn_id.to_expn_id());
|
let def_site = DUMMY_SP.with_def_site_ctxt(expn_id.to_expn_id());
|
||||||
|
|
|
@ -400,7 +400,7 @@ declare_features! (
|
||||||
(active, const_try, "1.56.0", Some(74935), None),
|
(active, const_try, "1.56.0", Some(74935), None),
|
||||||
/// Allows function attribute `#[coverage(on/off)]`, to control coverage
|
/// Allows function attribute `#[coverage(on/off)]`, to control coverage
|
||||||
/// instrumentation of that function.
|
/// instrumentation of that function.
|
||||||
(active, coverage, "CURRENT_RUSTC_VERSION", Some(84605), None),
|
(active, coverage_attribute, "CURRENT_RUSTC_VERSION", Some(84605), None),
|
||||||
/// Allows non-builtin attributes in inner attribute position.
|
/// Allows non-builtin attributes in inner attribute position.
|
||||||
(active, custom_inner_attributes, "1.30.0", Some(54726), None),
|
(active, custom_inner_attributes, "1.30.0", Some(54726), None),
|
||||||
/// Allows custom test frameworks with `#![test_runner]` and `#[test_case]`.
|
/// Allows custom test frameworks with `#![test_runner]` and `#[test_case]`.
|
||||||
|
|
|
@ -395,7 +395,7 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
|
||||||
template!(List: "address, kcfi, memory, thread"), DuplicatesOk,
|
template!(List: "address, kcfi, memory, thread"), DuplicatesOk,
|
||||||
experimental!(no_sanitize)
|
experimental!(no_sanitize)
|
||||||
),
|
),
|
||||||
gated!(coverage, Normal, template!(Word, List: "on|off"), WarnFollowing, experimental!(coverage)),
|
gated!(coverage, Normal, template!(Word, List: "on|off"), WarnFollowing, coverage_attribute, experimental!(coverage)),
|
||||||
|
|
||||||
ungated!(
|
ungated!(
|
||||||
doc, Normal, template!(List: "hidden|inline|...", NameValueStr: "string"), DuplicatesOk
|
doc, Normal, template!(List: "hidden|inline|...", NameValueStr: "string"), DuplicatesOk
|
||||||
|
|
|
@ -574,6 +574,7 @@ symbols! {
|
||||||
cosf64,
|
cosf64,
|
||||||
count,
|
count,
|
||||||
coverage,
|
coverage,
|
||||||
|
coverage_attribute,
|
||||||
cr,
|
cr,
|
||||||
crate_id,
|
crate_id,
|
||||||
crate_in_paths,
|
crate_in_paths,
|
||||||
|
|
|
@ -301,7 +301,7 @@ pub trait Eq: PartialEq<Self> {
|
||||||
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
|
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
|
||||||
#[allow_internal_unstable(core_intrinsics, derive_eq, structural_match)]
|
#[allow_internal_unstable(core_intrinsics, derive_eq, structural_match)]
|
||||||
#[cfg_attr(bootstrap, allow_internal_unstable(no_coverage))]
|
#[cfg_attr(bootstrap, allow_internal_unstable(no_coverage))]
|
||||||
#[cfg_attr(not(bootstrap), allow_internal_unstable(coverage))]
|
#[cfg_attr(not(bootstrap), allow_internal_unstable(coverage_attribute))]
|
||||||
pub macro Eq($item:item) {
|
pub macro Eq($item:item) {
|
||||||
/* compiler built-in */
|
/* compiler built-in */
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,7 +111,7 @@
|
||||||
// Library features:
|
// Library features:
|
||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![cfg_attr(bootstrap, feature(no_coverage))] // rust-lang/rust#84605
|
#![cfg_attr(bootstrap, feature(no_coverage))] // rust-lang/rust#84605
|
||||||
#![cfg_attr(not(bootstrap), feature(coverage))] // rust-lang/rust#84605
|
#![cfg_attr(not(bootstrap), feature(coverage_attribute))] // rust-lang/rust#84605
|
||||||
#![feature(char_indices_offset)]
|
#![feature(char_indices_offset)]
|
||||||
#![feature(const_align_of_val)]
|
#![feature(const_align_of_val)]
|
||||||
#![feature(const_align_of_val_raw)]
|
#![feature(const_align_of_val_raw)]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# `coverage`
|
# `coverage_attribute`
|
||||||
|
|
||||||
The tracking issue for this feature is: [#84605]
|
The tracking issue for this feature is: [#84605]
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ instrumentation in an annotated function. This might be useful to:
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
#![feature(coverage)]
|
#![feature(coverage_attribute)]
|
||||||
|
|
||||||
// `foo()` will get coverage instrumentation (by default)
|
// `foo()` will get coverage instrumentation (by default)
|
||||||
fn foo() {
|
fn foo() {
|
|
@ -1,5 +1,5 @@
|
||||||
error[E0557]: feature has been removed
|
error[E0557]: feature has been removed
|
||||||
--> $DIR/feature-gate-coverage.rs:2:12
|
--> $DIR/feature-gate-coverage-attribute.rs:2:12
|
||||||
|
|
|
|
||||||
LL | #![feature(no_coverage)]
|
LL | #![feature(no_coverage)]
|
||||||
| ^^^^^^^^^^^ feature has been removed
|
| ^^^^^^^^^^^ feature has been removed
|
||||||
|
@ -7,13 +7,13 @@ LL | #![feature(no_coverage)]
|
||||||
= note: renamed to `coverage`
|
= note: renamed to `coverage`
|
||||||
|
|
||||||
error[E0658]: the `#[coverage]` attribute is an experimental feature
|
error[E0658]: the `#[coverage]` attribute is an experimental feature
|
||||||
--> $DIR/feature-gate-coverage.rs:10:1
|
--> $DIR/feature-gate-coverage-attribute.rs:10:1
|
||||||
|
|
|
|
||||||
LL | #[coverage(off)]
|
LL | #[coverage(off)]
|
||||||
| ^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
= note: see issue #84605 <https://github.com/rust-lang/rust/issues/84605> for more information
|
= note: see issue #84605 <https://github.com/rust-lang/rust/issues/84605> for more information
|
||||||
= help: add `#![feature(coverage)]` to the crate attributes to enable
|
= help: add `#![feature(coverage_attribute)]` to the crate attributes to enable
|
||||||
|
|
||||||
error: aborting due to 2 previous errors
|
error: aborting due to 2 previous errors
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#![feature(extern_types)]
|
#![feature(extern_types)]
|
||||||
#![feature(coverage)]
|
#![feature(coverage_attribute)]
|
||||||
#![feature(impl_trait_in_assoc_type)]
|
#![feature(impl_trait_in_assoc_type)]
|
||||||
#![warn(unused_attributes)]
|
#![warn(unused_attributes)]
|
||||||
#![coverage(off)]
|
#![coverage(off)]
|
||||||
|
|
Loading…
Reference in New Issue