fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

1.43.1
789 B30 linesraw
1error: malformed `non_exhaustive` attribute input
2  --> $DIR/invalid-attribute.rs:1:1
3   |
4LL | #[non_exhaustive(anything)]
5   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[non_exhaustive]`
6
7error[E0701]: attribute can only be applied to a struct or enum
8  --> $DIR/invalid-attribute.rs:5:1
9   |
10LL | #[non_exhaustive]
11   | ^^^^^^^^^^^^^^^^^
12LL |
13LL | trait Bar { }
14   | ------------- not a struct or enum
15
16error[E0701]: attribute can only be applied to a struct or enum
17  --> $DIR/invalid-attribute.rs:9:1
18   |
19LL |   #[non_exhaustive]
20   |   ^^^^^^^^^^^^^^^^^
21LL |
22LL | / union Baz {
23LL | |     f1: u16,
24LL | |     f2: u16
25LL | | }
26   | |_- not a struct or enum
27
28error: aborting due to 3 previous errors
29
30For more information about this error, try `rustc --explain E0701`.