Add no_coverage to the 'removed features' list

This commit is contained in:
Andy Caldwell 2023-08-11 20:39:20 +01:00
parent 8e03371fc3
commit de1600d110
No known key found for this signature in database
GPG key ID: D4204541AC1D228D
5 changed files with 19 additions and 5 deletions

View file

@ -400,7 +400,7 @@ declare_features! (
(active, const_try, "1.56.0", Some(74935), None),
/// Allows function attribute `#[coverage(on/off)]`, to control coverage
/// instrumentation of that function.
(active, coverage, "1.53.0", Some(84605), None),
(active, coverage, "CURRENT_RUSTC_VERSION", Some(84605), None),
/// Allows non-builtin attributes in inner attribute position.
(active, custom_inner_attributes, "1.30.0", Some(54726), None),
/// Allows custom test frameworks with `#![test_runner]` and `#[test_case]`.

View file

@ -136,6 +136,9 @@ declare_features! (
Some("subsumed by `#![feature(allocator_internals)]`")),
/// Allows use of unary negate on unsigned integers, e.g., -e for e: u8
(removed, negate_unsigned, "1.0.0", Some(29645), None, None),
/// Allows `#[no_coverage]` on functions.
/// The feature was renamed to `coverage` and the attribute to `#[coverage(on|off)]`
(removed, no_coverage, "CURRENT_RUSTC_VERSION", Some(84605), None, Some("renamed to `coverage`")),
/// Allows `#[no_debug]`.
(removed, no_debug, "1.43.0", Some(29721), None, Some("removed due to lack of demand")),
/// Allows using `#[on_unimplemented(..)]` on traits.

View file

@ -1038,6 +1038,7 @@ symbols! {
no,
no_builtins,
no_core,
no_coverage,
no_crate_inject,
no_debug,
no_default_passes,

View file

@ -1,4 +1,5 @@
#![crate_type = "lib"]
#![feature(no_coverage)] //~ ERROR feature has been removed [E0557]
#[derive(PartialEq, Eq)] // ensure deriving `Eq` does not enable `feature(coverage)`
struct Foo {
@ -7,7 +8,7 @@ struct Foo {
}
#[coverage(off)] //~ ERROR the `#[coverage]` attribute is an experimental feature
fn requires_feature_no_coverage() -> bool {
fn requires_feature_coverage() -> bool {
let bar = Foo { a: 0, b: 0 };
bar == Foo { a: 0, b: 0 }
}

View file

@ -1,5 +1,13 @@
error[E0557]: feature has been removed
--> $DIR/feature-gate-coverage.rs:2:12
|
LL | #![feature(no_coverage)]
| ^^^^^^^^^^^ feature has been removed
|
= note: renamed to `coverage`
error[E0658]: the `#[coverage]` attribute is an experimental feature
--> $DIR/feature-gate-coverage.rs:9:1
--> $DIR/feature-gate-coverage.rs:10:1
|
LL | #[coverage(off)]
| ^^^^^^^^^^^^^^^^
@ -7,6 +15,7 @@ LL | #[coverage(off)]
= 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
error: aborting due to previous error
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0658`.
Some errors have detailed explanations: E0557, E0658.
For more information about an error, try `rustc --explain E0557`.