2018-03-24 18:07:18 +00:00
|
|
|
#![feature(non_exhaustive)]
|
|
|
|
|
|
|
|
|
|
#[non_exhaustive(anything)]
|
2019-01-02 02:21:05 +03:00
|
|
|
//~^ ERROR attribute must be of the form
|
2018-03-24 18:07:18 +00:00
|
|
|
struct Foo;
|
|
|
|
|
|
|
|
|
|
#[non_exhaustive]
|
2018-06-10 14:04:48 +02:00
|
|
|
//~^ ERROR attribute can only be applied to a struct or enum [E0701]
|
2018-03-24 18:07:18 +00:00
|
|
|
trait Bar { }
|
|
|
|
|
|
|
|
|
|
#[non_exhaustive]
|
2018-06-10 14:04:48 +02:00
|
|
|
//~^ ERROR attribute can only be applied to a struct or enum [E0701]
|
2018-03-24 18:07:18 +00:00
|
|
|
union Baz {
|
|
|
|
|
f1: u16,
|
|
|
|
|
f2: u16
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() { }
|