rust/tests/ui/feature-gates/feature-gate-coverage-attribute.rs
Zalathar 87c2f9a5be Revert "Auto merge of #130766 - clarfonthey:stable-coverage-attribute, r=wesleywiser"
This reverts commit 1d35638dc38dbfbf1cc2a9823135dfcf3c650169, reversing
changes made to f23a80a4c2fbca593b64e70f5970368824b4c5e9.
2024-12-23 12:30:37 +11:00

15 lines
405 B
Rust

#![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 {
a: u8,
b: u32,
}
#[coverage(off)] //~ ERROR the `#[coverage]` attribute is an experimental feature
fn requires_feature_coverage() -> bool {
let bar = Foo { a: 0, b: 0 };
bar == Foo { a: 0, b: 0 }
}