]> git.lizzy.rs Git - rust.git/blob - src/test/ui/feature-gates/feature-gate-no_coverage.rs
Rollup merge of #93273 - bjorn3:rustbuild_improvements, r=Mark-Simulacrum
[rust.git] / src / test / ui / feature-gates / feature-gate-no_coverage.rs
1 #![crate_type = "lib"]
2
3 #[derive(PartialEq, Eq)] // ensure deriving `Eq` does not enable `feature(no_coverage)`
4 struct Foo {
5     a: u8,
6     b: u32,
7 }
8
9 #[no_coverage] //~ ERROR the `#[no_coverage]` attribute is an experimental feature
10 fn requires_feature_no_coverage() -> bool {
11     let bar = Foo { a: 0, b: 0 };
12     bar == Foo { a: 0, b: 0 }
13 }