summaryrefslogtreecommitdiffstats
path: root/tests/ui/rfc-2008-non-exhaustive/invalid-attribute.rs
blob: 143f9a3009b6171846dcd3e1715c9e694deaafc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#[non_exhaustive(anything)]
//~^ ERROR malformed `non_exhaustive` attribute
struct Foo;

#[non_exhaustive]
//~^ ERROR attribute should be applied to a struct or enum [E0701]
trait Bar { }

#[non_exhaustive]
//~^ ERROR attribute should be applied to a struct or enum [E0701]
union Baz {
    f1: u16,
    f2: u16
}

fn main() { }