]> git.proxmox.com Git - rustc.git/blob - tests/ui/repr/repr-transparent.stderr
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / repr / repr-transparent.stderr
1 error[E0690]: transparent struct needs at most one non-zero-sized field, but has 2
2 --> $DIR/repr-transparent.rs:26:1
3 |
4 LL | struct MultipleNonZst(u8, u8);
5 | ^^^^^^^^^^^^^^^^^^^^^ -- -- this field is non-zero-sized
6 | | |
7 | | this field is non-zero-sized
8 | needs at most one non-zero-sized field, but has 2
9
10 error[E0690]: transparent struct needs at most one non-zero-sized field, but has 2
11 --> $DIR/repr-transparent.rs:32:1
12 |
13 LL | pub struct StructWithProjection(f32, <f32 as Mirror>::It);
14 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ --- ------------------- this field is non-zero-sized
15 | | |
16 | | this field is non-zero-sized
17 | needs at most one non-zero-sized field, but has 2
18
19 error[E0691]: zero-sized field in transparent struct has alignment larger than 1
20 --> $DIR/repr-transparent.rs:36:32
21 |
22 LL | struct NontrivialAlignZst(u32, [u16; 0]);
23 | ^^^^^^^^ has alignment larger than 1
24
25 error[E0691]: zero-sized field in transparent struct has alignment larger than 1
26 --> $DIR/repr-transparent.rs:42:24
27 |
28 LL | struct GenericAlign<T>(ZstAlign32<T>, u32);
29 | ^^^^^^^^^^^^^ has alignment larger than 1
30
31 error[E0084]: unsupported representation for zero-variant enum
32 --> $DIR/repr-transparent.rs:44:1
33 |
34 LL | #[repr(transparent)]
35 | ^^^^^^^^^^^^^^^^^^^^
36 LL | enum Void {}
37 | --------- zero-variant enum
38
39 error[E0731]: transparent enum needs exactly one variant, but has 0
40 --> $DIR/repr-transparent.rs:45:1
41 |
42 LL | enum Void {}
43 | ^^^^^^^^^ needs exactly one variant, but has 0
44
45 error[E0690]: the variant of a transparent enum needs at most one non-zero-sized field, but has 2
46 --> $DIR/repr-transparent.rs:58:1
47 |
48 LL | enum TooManyFieldsEnum {
49 | ^^^^^^^^^^^^^^^^^^^^^^ needs at most one non-zero-sized field, but has 2
50 LL | Foo(u32, String),
51 | --- ------ this field is non-zero-sized
52 | |
53 | this field is non-zero-sized
54
55 error[E0731]: transparent enum needs exactly one variant, but has 2
56 --> $DIR/repr-transparent.rs:64:1
57 |
58 LL | enum MultipleVariants {
59 | ^^^^^^^^^^^^^^^^^^^^^ needs exactly one variant, but has 2
60 LL | Foo(String),
61 | ---
62 LL | Bar,
63 | --- too many variants in `MultipleVariants`
64
65 error[E0691]: zero-sized field in transparent enum has alignment larger than 1
66 --> $DIR/repr-transparent.rs:71:14
67 |
68 LL | Foo(u32, [u16; 0]),
69 | ^^^^^^^^ has alignment larger than 1
70
71 error[E0691]: zero-sized field in transparent enum has alignment larger than 1
72 --> $DIR/repr-transparent.rs:76:11
73 |
74 LL | Foo { bar: ZstAlign32<T>, baz: u32 }
75 | ^^^^^^^^^^^^^^^^^^ has alignment larger than 1
76
77 error[E0690]: transparent union needs at most one non-zero-sized field, but has 2
78 --> $DIR/repr-transparent.rs:85:1
79 |
80 LL | union TooManyFields {
81 | ^^^^^^^^^^^^^^^^^^^ needs at most one non-zero-sized field, but has 2
82 LL | u: u32,
83 | ------ this field is non-zero-sized
84 LL | s: i32
85 | ------ this field is non-zero-sized
86
87 error: aborting due to 11 previous errors
88
89 Some errors have detailed explanations: E0084, E0690, E0691, E0731.
90 For more information about an error, try `rustc --explain E0084`.