]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2008-non-exhaustive/invalid-attribute.rs
Merge commit 'd3a2366ee877075c59b38bd8ced55f224fc7ef51' into sync_cg_clif-2022-07-26
[rust.git] / src / test / ui / rfc-2008-non-exhaustive / invalid-attribute.rs
1 #[non_exhaustive(anything)]
2 //~^ ERROR malformed `non_exhaustive` attribute
3 struct Foo;
4
5 #[non_exhaustive]
6 //~^ ERROR attribute should be applied to a struct or enum [E0701]
7 trait Bar { }
8
9 #[non_exhaustive]
10 //~^ ERROR attribute should be applied to a struct or enum [E0701]
11 union Baz {
12     f1: u16,
13     f2: u16
14 }
15
16 fn main() { }