|
| 1 | +error: zero-sized fields in `repr(transparent)` cannot contain array types with non-trivial element types |
| 2 | + --> $DIR/repr-transparent-array.rs:17:22 |
| 3 | + | |
| 4 | +LL | pub struct T5(Sized, SusArray); |
| 5 | + | ^^^^^^^^ |
| 6 | + | |
| 7 | + = note: this field contains `[u8; 0]`, which is an array with a non-trivial element type, so it is not guaranteed to have a trivial ABI in all situations. |
| 8 | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! |
| 9 | + = note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586> |
| 10 | +note: the lint level is defined here |
| 11 | + --> $DIR/repr-transparent-array.rs:1:9 |
| 12 | + | |
| 13 | +LL | #![deny(repr_transparent_non_zst_fields)] |
| 14 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 15 | + |
| 16 | +error: zero-sized fields in `repr(transparent)` cannot contain array types with non-trivial element types |
| 17 | + --> $DIR/repr-transparent-array.rs:22:15 |
| 18 | + | |
| 19 | +LL | pub struct T6(SusArray, Sized); |
| 20 | + | ^^^^^^^^ |
| 21 | + | |
| 22 | + = note: this field contains `[u8; 0]`, which is an array with a non-trivial element type, so it is not guaranteed to have a trivial ABI in all situations. |
| 23 | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! |
| 24 | + = note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586> |
| 25 | + |
| 26 | +error: zero-sized fields in `repr(transparent)` cannot contain array types with non-trivial element types |
| 27 | + --> $DIR/repr-transparent-array.rs:27:19 |
| 28 | + | |
| 29 | +LL | pub struct T7(T1, SusArray); // still wrong, even when the array is hidden inside another type |
| 30 | + | ^^^^^^^^ |
| 31 | + | |
| 32 | + = note: this field contains `[u8; 0]`, which is an array with a non-trivial element type, so it is not guaranteed to have a trivial ABI in all situations. |
| 33 | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! |
| 34 | + = note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586> |
| 35 | + |
| 36 | +error: zero-sized fields in `repr(transparent)` cannot contain array types with non-trivial element types |
| 37 | + --> $DIR/repr-transparent-array.rs:32:25 |
| 38 | + | |
| 39 | +LL | pub struct T8(SusArray, SusArray); // still wrong |
| 40 | + | ^^^^^^^^ |
| 41 | + | |
| 42 | + = note: this field contains `[u8; 0]`, which is an array with a non-trivial element type, so it is not guaranteed to have a trivial ABI in all situations. |
| 43 | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! |
| 44 | + = note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586> |
| 45 | + |
| 46 | +error: zero-sized fields in `repr(transparent)` cannot contain array types with non-trivial element types |
| 47 | + --> $DIR/repr-transparent-array.rs:37:29 |
| 48 | + | |
| 49 | +LL | pub struct T9([[u8; 0]; 0], SusArray); // still wrong |
| 50 | + | ^^^^^^^^ |
| 51 | + | |
| 52 | + = note: this field contains `[u8; 0]`, which is an array with a non-trivial element type, so it is not guaranteed to have a trivial ABI in all situations. |
| 53 | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! |
| 54 | + = note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586> |
| 55 | + |
| 56 | +error: aborting due to 5 previous errors |
| 57 | + |
| 58 | +Future incompatibility report: Future breakage diagnostic: |
| 59 | +error: zero-sized fields in `repr(transparent)` cannot contain array types with non-trivial element types |
| 60 | + --> $DIR/repr-transparent-array.rs:17:22 |
| 61 | + | |
| 62 | +LL | pub struct T5(Sized, SusArray); |
| 63 | + | ^^^^^^^^ |
| 64 | + | |
| 65 | + = note: this field contains `[u8; 0]`, which is an array with a non-trivial element type, so it is not guaranteed to have a trivial ABI in all situations. |
| 66 | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! |
| 67 | + = note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586> |
| 68 | +note: the lint level is defined here |
| 69 | + --> $DIR/repr-transparent-array.rs:1:9 |
| 70 | + | |
| 71 | +LL | #![deny(repr_transparent_non_zst_fields)] |
| 72 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 73 | + |
| 74 | +Future breakage diagnostic: |
| 75 | +error: zero-sized fields in `repr(transparent)` cannot contain array types with non-trivial element types |
| 76 | + --> $DIR/repr-transparent-array.rs:22:15 |
| 77 | + | |
| 78 | +LL | pub struct T6(SusArray, Sized); |
| 79 | + | ^^^^^^^^ |
| 80 | + | |
| 81 | + = note: this field contains `[u8; 0]`, which is an array with a non-trivial element type, so it is not guaranteed to have a trivial ABI in all situations. |
| 82 | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! |
| 83 | + = note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586> |
| 84 | +note: the lint level is defined here |
| 85 | + --> $DIR/repr-transparent-array.rs:1:9 |
| 86 | + | |
| 87 | +LL | #![deny(repr_transparent_non_zst_fields)] |
| 88 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 89 | + |
| 90 | +Future breakage diagnostic: |
| 91 | +error: zero-sized fields in `repr(transparent)` cannot contain array types with non-trivial element types |
| 92 | + --> $DIR/repr-transparent-array.rs:27:19 |
| 93 | + | |
| 94 | +LL | pub struct T7(T1, SusArray); // still wrong, even when the array is hidden inside another type |
| 95 | + | ^^^^^^^^ |
| 96 | + | |
| 97 | + = note: this field contains `[u8; 0]`, which is an array with a non-trivial element type, so it is not guaranteed to have a trivial ABI in all situations. |
| 98 | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! |
| 99 | + = note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586> |
| 100 | +note: the lint level is defined here |
| 101 | + --> $DIR/repr-transparent-array.rs:1:9 |
| 102 | + | |
| 103 | +LL | #![deny(repr_transparent_non_zst_fields)] |
| 104 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 105 | + |
| 106 | +Future breakage diagnostic: |
| 107 | +error: zero-sized fields in `repr(transparent)` cannot contain array types with non-trivial element types |
| 108 | + --> $DIR/repr-transparent-array.rs:32:25 |
| 109 | + | |
| 110 | +LL | pub struct T8(SusArray, SusArray); // still wrong |
| 111 | + | ^^^^^^^^ |
| 112 | + | |
| 113 | + = note: this field contains `[u8; 0]`, which is an array with a non-trivial element type, so it is not guaranteed to have a trivial ABI in all situations. |
| 114 | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! |
| 115 | + = note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586> |
| 116 | +note: the lint level is defined here |
| 117 | + --> $DIR/repr-transparent-array.rs:1:9 |
| 118 | + | |
| 119 | +LL | #![deny(repr_transparent_non_zst_fields)] |
| 120 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 121 | + |
| 122 | +Future breakage diagnostic: |
| 123 | +error: zero-sized fields in `repr(transparent)` cannot contain array types with non-trivial element types |
| 124 | + --> $DIR/repr-transparent-array.rs:37:29 |
| 125 | + | |
| 126 | +LL | pub struct T9([[u8; 0]; 0], SusArray); // still wrong |
| 127 | + | ^^^^^^^^ |
| 128 | + | |
| 129 | + = note: this field contains `[u8; 0]`, which is an array with a non-trivial element type, so it is not guaranteed to have a trivial ABI in all situations. |
| 130 | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! |
| 131 | + = note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586> |
| 132 | +note: the lint level is defined here |
| 133 | + --> $DIR/repr-transparent-array.rs:1:9 |
| 134 | + | |
| 135 | +LL | #![deny(repr_transparent_non_zst_fields)] |
| 136 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 137 | + |
0 commit comments