]> git.proxmox.com Git - rustc.git/blame - src/test/ui/rfc-2008-non-exhaustive/invalid-attribute.rs
New upstream version 1.34.2+dfsg1
[rustc.git] / src / test / ui / rfc-2008-non-exhaustive / invalid-attribute.rs
CommitLineData
83c7162d 1#![feature(non_exhaustive)]
d9579d0f 2
83c7162d 3#[non_exhaustive(anything)]
9fa01778 4//~^ ERROR attribute must be of the form
83c7162d 5struct Foo;
223e47cc 6
83c7162d 7#[non_exhaustive]
94b46f34 8//~^ ERROR attribute can only be applied to a struct or enum [E0701]
83c7162d 9trait Bar { }
1a4d82fc 10
83c7162d 11#[non_exhaustive]
94b46f34 12//~^ ERROR attribute can only be applied to a struct or enum [E0701]
83c7162d
XL
13union Baz {
14 f1: u16,
15 f2: u16
16}
223e47cc
LB
17
18fn main() { }