]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2008-non-exhaustive/invalid-attribute.stderr
parser will not give wrong help message for 'public'
[rust.git] / src / test / ui / rfc-2008-non-exhaustive / invalid-attribute.stderr
1 error: malformed `non_exhaustive` attribute input
2   --> $DIR/invalid-attribute.rs:1:1
3    |
4 LL | #[non_exhaustive(anything)]
5    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[non_exhaustive]`
6
7 error[E0701]: attribute should be applied to a struct or enum
8   --> $DIR/invalid-attribute.rs:5:1
9    |
10 LL | #[non_exhaustive]
11    | ^^^^^^^^^^^^^^^^^
12 LL |
13 LL | trait Bar { }
14    | ------------- not a struct or enum
15
16 error[E0701]: attribute should be applied to a struct or enum
17   --> $DIR/invalid-attribute.rs:9:1
18    |
19 LL |   #[non_exhaustive]
20    |   ^^^^^^^^^^^^^^^^^
21 LL |
22 LL | / union Baz {
23 LL | |     f1: u16,
24 LL | |     f2: u16
25 LL | | }
26    | |_- not a struct or enum
27
28 error: aborting due to 3 previous errors
29
30 For more information about this error, try `rustc --explain E0701`.