summaryrefslogtreecommitdiffstats
path: root/src/test/ui/feature-gates/feature-gate-no_coverage.rs
blob: fd4c6f76059aa6af2db3bcf2337a457e8c253c5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#![crate_type = "lib"]

#[derive(PartialEq, Eq)] // ensure deriving `Eq` does not enable `feature(no_coverage)`
struct Foo {
    a: u8,
    b: u32,
}

#[no_coverage] //~ ERROR the `#[no_coverage]` attribute is an experimental feature
fn requires_feature_no_coverage() -> bool {
    let bar = Foo { a: 0, b: 0 };
    bar == Foo { a: 0, b: 0 }
}