diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/feature-gates/feature-gate-coverage-attribute.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/feature-gates/feature-gate-coverage-attribute.rs b/tests/ui/feature-gates/feature-gate-coverage-attribute.rs new file mode 100644 index 000000000..0a463755f --- /dev/null +++ b/tests/ui/feature-gates/feature-gate-coverage-attribute.rs @@ -0,0 +1,14 @@ +#![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 } +} |