1error: this conflicts with another representation hint 2 --> tests/ui-stable/struct.rs:133:11 3 | 4133 | #[repr(C, C)] // zerocopy-derive conservatively treats these as conflicting reprs 5 | ^ 6 7error: must have a non-align #[repr(...)] attribute in order to guarantee this type's memory layout 8 --> tests/ui-stable/struct.rs:138:10 9 | 10138 | #[derive(IntoBytes)] 11 | ^^^^^^^^^ 12 | 13 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info) 14 15error: must have a non-align #[repr(...)] attribute in order to guarantee this type's memory layout 16 --> tests/ui-stable/struct.rs:143:10 17 | 18143 | #[derive(IntoBytes)] 19 | ^^^^^^^^^ 20 | 21 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info) 22 23error: must have a non-align #[repr(...)] attribute in order to guarantee this type's memory layout 24 --> tests/ui-stable/struct.rs:166:10 25 | 26166 | #[derive(IntoBytes)] 27 | ^^^^^^^^^ 28 | 29 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info) 30 31error: cannot derive `Unaligned` on type with alignment greater than 1 32 --> tests/ui-stable/struct.rs:177:11 33 | 34177 | #[repr(C, align(2))] 35 | ^^^^^ 36 37error: this conflicts with another representation hint 38 --> tests/ui-stable/struct.rs:181:8 39 | 40181 | #[repr(transparent, align(2))] 41 | ^^^^^^^^^^^ 42 43error: this conflicts with another representation hint 44 --> tests/ui-stable/struct.rs:187:16 45 | 46187 | #[repr(packed, align(2))] 47 | ^^^^^ 48 49error: this conflicts with another representation hint 50 --> tests/ui-stable/struct.rs:191:18 51 | 52191 | #[repr(align(1), align(2))] 53 | ^^^^^ 54 55error: this conflicts with another representation hint 56 --> tests/ui-stable/struct.rs:195:18 57 | 58195 | #[repr(align(2), align(4))] 59 | ^^^^^ 60 61error: must have #[repr(C)], #[repr(transparent)], or #[repr(packed)] attribute in order to guarantee this type's alignment 62 --> tests/ui-stable/struct.rs:198:10 63 | 64198 | #[derive(Unaligned)] 65 | ^^^^^^^^^ 66 | 67 = note: this error originates in the derive macro `Unaligned` (in Nightly builds, run with -Z macro-backtrace for more info) 68 69error: must have #[repr(C)], #[repr(transparent)], or #[repr(packed)] attribute in order to guarantee this type's alignment 70 --> tests/ui-stable/struct.rs:201:10 71 | 72201 | #[derive(Unaligned)] 73 | ^^^^^^^^^ 74 | 75 = note: this error originates in the derive macro `Unaligned` (in Nightly builds, run with -Z macro-backtrace for more info) 76 77error: this conflicts with another representation hint 78 --> tests/ui-stable/struct.rs:211:8 79 | 80211 | #[repr(C, packed(2))] 81 | ^ 82 83error[E0692]: transparent struct cannot have other repr hints 84 --> tests/ui-stable/struct.rs:181:8 85 | 86181 | #[repr(transparent, align(2))] 87 | ^^^^^^^^^^^ ^^^^^^^^ 88 89error[E0277]: the size for values of type `[u8]` cannot be known at compilation time 90 --> tests/ui-stable/struct.rs:31:10 91 | 9231 | #[derive(KnownLayout)] 93 | ^^^^^^^^^^^ doesn't have a size known at compile-time 94 | 95 = help: within `KL00`, the trait `Sized` is not implemented for `[u8]` 96note: required because it appears within the type `KL00` 97 --> tests/ui-stable/struct.rs:32:8 98 | 9932 | struct KL00(u8, NotKnownLayoutDst); 100 | ^^^^ 101 = help: see issue #48214 102 = note: this error originates in the derive macro `KnownLayout` (in Nightly builds, run with -Z macro-backtrace for more info) 103 104error[E0277]: the size for values of type `[u8]` cannot be known at compilation time 105 --> tests/ui-stable/struct.rs:36:10 106 | 10736 | #[derive(KnownLayout)] 108 | ^^^^^^^^^^^ doesn't have a size known at compile-time 109 | 110 = help: within `KL02`, the trait `Sized` is not implemented for `[u8]` 111note: required because it appears within the type `KL02` 112 --> tests/ui-stable/struct.rs:37:8 113 | 11437 | struct KL02(u8, [u8]); 115 | ^^^^ 116 = help: see issue #48214 117 = note: this error originates in the derive macro `KnownLayout` (in Nightly builds, run with -Z macro-backtrace for more info) 118 119error[E0277]: the trait bound `NotKnownLayoutDst: zerocopy::KnownLayout` is not satisfied 120 --> tests/ui-stable/struct.rs:41:10 121 | 12241 | #[derive(KnownLayout)] 123 | ^^^^^^^^^^^ the trait `zerocopy::KnownLayout` is not implemented for `NotKnownLayoutDst` 124 | 125 = note: Consider adding `#[derive(KnownLayout)]` to `NotKnownLayoutDst` 126 = help: the following other types implement trait `zerocopy::KnownLayout`: 127 &T 128 &mut T 129 () 130 *const T 131 *mut T 132 AU16 133 AtomicBool 134 AtomicI16 135 and $N others 136 = help: see issue #48214 137 = note: this error originates in the derive macro `KnownLayout` (in Nightly builds, run with -Z macro-backtrace for more info) 138 139error[E0277]: the trait bound `NotKnownLayout: zerocopy::KnownLayout` is not satisfied 140 --> tests/ui-stable/struct.rs:47:10 141 | 14247 | #[derive(KnownLayout)] 143 | ^^^^^^^^^^^ the trait `zerocopy::KnownLayout` is not implemented for `NotKnownLayout` 144 | 145 = note: Consider adding `#[derive(KnownLayout)]` to `NotKnownLayout` 146 = help: the following other types implement trait `zerocopy::KnownLayout`: 147 &T 148 &mut T 149 () 150 *const T 151 *mut T 152 AU16 153 AtomicBool 154 AtomicI16 155 and $N others 156 = help: see issue #48214 157 = note: this error originates in the derive macro `KnownLayout` (in Nightly builds, run with -Z macro-backtrace for more info) 158 159error[E0277]: the trait bound `UnsafeCell<()>: zerocopy::Immutable` is not satisfied 160 --> tests/ui-stable/struct.rs:55:10 161 | 16255 | #[derive(Immutable)] 163 | ^^^^^^^^^ the trait `zerocopy::Immutable` is not implemented for `UnsafeCell<()>` 164 | 165 = note: Consider adding `#[derive(Immutable)]` to `UnsafeCell<()>` 166 = help: the following other types implement trait `zerocopy::Immutable`: 167 &T 168 &mut T 169 () 170 *const T 171 *mut T 172 AU16 173 F32<O> 174 F64<O> 175 and $N others 176 = help: see issue #48214 177 = note: this error originates in the derive macro `Immutable` (in Nightly builds, run with -Z macro-backtrace for more info) 178 179error[E0277]: the trait bound `UnsafeCell<u8>: zerocopy::Immutable` is not satisfied 180 --> tests/ui-stable/struct.rs:60:10 181 | 18260 | #[derive(Immutable)] 183 | ^^^^^^^^^ the trait `zerocopy::Immutable` is not implemented for `UnsafeCell<u8>` 184 | 185 = note: Consider adding `#[derive(Immutable)]` to `UnsafeCell<u8>` 186 = help: the following other types implement trait `zerocopy::Immutable`: 187 &T 188 &mut T 189 () 190 *const T 191 *mut T 192 AU16 193 F32<O> 194 F64<O> 195 and $N others 196 = note: required for `[UnsafeCell<u8>; 0]` to implement `zerocopy::Immutable` 197 = help: see issue #48214 198 = note: this error originates in the derive macro `Immutable` (in Nightly builds, run with -Z macro-backtrace for more info) 199 200error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type 201 --> tests/ui-stable/struct.rs:71:1 202 | 20371 | struct TryFromBytesPacked { 204 | ^^^^^^^^^^^^^^^^^^^^^^^^^ 205 | 206note: `AU16` has a `#[repr(align)]` attribute 207 --> tests/ui-stable/../include.rs 208 | 209 | pub struct AU16(pub u16); 210 | ^^^^^^^^^^^^^^^ 211 212error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type 213 --> tests/ui-stable/struct.rs:77:1 214 | 21577 | struct TryFromBytesPackedN { 216 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ 217 | 218note: `AU16` has a `#[repr(align)]` attribute 219 --> tests/ui-stable/../include.rs 220 | 221 | pub struct AU16(pub u16); 222 | ^^^^^^^^^^^^^^^ 223 224error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type 225 --> tests/ui-stable/struct.rs:83:1 226 | 22783 | struct TryFromBytesCPacked { 228 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ 229 | 230note: `AU16` has a `#[repr(align)]` attribute 231 --> tests/ui-stable/../include.rs 232 | 233 | pub struct AU16(pub u16); 234 | ^^^^^^^^^^^^^^^ 235 236error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type 237 --> tests/ui-stable/struct.rs:89:1 238 | 23989 | struct TryFromBytesCPackedN { 240 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 241 | 242note: `AU16` has a `#[repr(align)]` attribute 243 --> tests/ui-stable/../include.rs 244 | 245 | pub struct AU16(pub u16); 246 | ^^^^^^^^^^^^^^^ 247 248error[E0277]: the trait bound `AU16: zerocopy::Unaligned` is not satisfied 249 --> tests/ui-stable/struct.rs:100:10 250 | 251100 | #[derive(IntoBytes)] 252 | ^^^^^^^^^ the trait `zerocopy::Unaligned` is not implemented for `AU16` 253 | 254 = note: Consider adding `#[derive(Unaligned)]` to `AU16` 255 = help: the following other types implement trait `zerocopy::Unaligned`: 256 () 257 AtomicBool 258 AtomicI8 259 AtomicU8 260 F32<O> 261 F64<O> 262 I128<O> 263 I16<O> 264 and $N others 265 = help: see issue #48214 266 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info) 267 268error[E0277]: `IntoBytes2` has inter-field padding 269 --> tests/ui-stable/struct.rs:107:10 270 | 271107 | #[derive(IntoBytes)] 272 | ^^^^^^^^^ types with padding cannot implement `IntoBytes` 273 | 274 = note: consider using `zerocopy::Unalign` to lower the alignment of individual fields 275 = note: consider adding explicit fields where padding would be 276 = note: consider using `#[repr(packed)]` to remove inter-field padding 277 = help: the trait `PaddingFree<IntoBytes2, true>` is not implemented for `()` 278 but trait `PaddingFree<IntoBytes2, false>` is implemented for it 279 = help: see issue #48214 280 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info) 281 282error[E0277]: `IntoBytes3` has inter-field padding 283 --> tests/ui-stable/struct.rs:114:10 284 | 285114 | #[derive(IntoBytes)] 286 | ^^^^^^^^^ types with padding cannot implement `IntoBytes` 287 | 288 = note: consider using `zerocopy::Unalign` to lower the alignment of individual fields 289 = note: consider adding explicit fields where padding would be 290 = note: consider using `#[repr(packed)]` to remove inter-field padding 291 = help: the trait `PaddingFree<IntoBytes3, true>` is not implemented for `()` 292 but trait `PaddingFree<IntoBytes3, false>` is implemented for it 293 = help: see issue #48214 294 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info) 295 296error[E0277]: the size for values of type `[u8]` cannot be known at compilation time 297 --> tests/ui-stable/struct.rs:125:10 298 | 299125 | #[derive(IntoBytes)] 300 | ^^^^^^^^^ doesn't have a size known at compile-time 301 | 302 = help: within `IntoBytes4`, the trait `Sized` is not implemented for `[u8]` 303note: required because it appears within the type `IntoBytes4` 304 --> tests/ui-stable/struct.rs:127:8 305 | 306127 | struct IntoBytes4 { 307 | ^^^^^^^^^^ 308 = note: required for `IntoBytes4` to implement `macro_util::__size_of::Sized` 309note: required by a bound in `macro_util::__size_of::size_of` 310 --> $WORKSPACE/src/util/macro_util.rs 311 | 312 | pub const fn size_of<T: Sized + ?core::marker::Sized>() -> usize { 313 | ^^^^^ required by this bound in `size_of` 314 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info) 315 316error[E0277]: `[u8]` is unsized 317 --> tests/ui-stable/struct.rs:129:8 318 | 319129 | b: [u8], 320 | ^^^^ `IntoBytes` needs all field types to be `Sized` in order to determine whether there is inter-field padding 321 | 322 = help: the trait `Sized` is not implemented for `[u8]` 323 = note: consider using `#[repr(packed)]` to remove inter-field padding 324 = note: `IntoBytes` does not require the fields of `#[repr(packed)]` types to be `Sized` 325 = note: required for `[u8]` to implement `macro_util::__size_of::Sized` 326note: required by a bound in `macro_util::__size_of::size_of` 327 --> $WORKSPACE/src/util/macro_util.rs 328 | 329 | pub const fn size_of<T: Sized + ?core::marker::Sized>() -> usize { 330 | ^^^^^ required by this bound in `size_of` 331 332error[E0587]: type has conflicting packed and align representation hints 333 --> tests/ui-stable/struct.rs:188:1 334 | 335188 | struct Unaligned3; 336 | ^^^^^^^^^^^^^^^^^ 337 338error[E0277]: the trait bound `AU16: zerocopy::Unaligned` is not satisfied 339 --> tests/ui-stable/struct.rs:161:28 340 | 341161 | is_into_bytes_11::<IntoBytes11<AU16>>(); 342 | ^^^^^^^^^^^^^^^^^ the trait `zerocopy::Unaligned` is not implemented for `AU16` 343 | 344 = note: Consider adding `#[derive(Unaligned)]` to `AU16` 345 = help: the following other types implement trait `zerocopy::Unaligned`: 346 () 347 AtomicBool 348 AtomicI8 349 AtomicU8 350 F32<O> 351 F64<O> 352 I128<O> 353 I16<O> 354 and $N others 355note: required for `IntoBytes11<AU16>` to implement `zerocopy::IntoBytes` 356 --> tests/ui-stable/struct.rs:150:10 357 | 358150 | #[derive(IntoBytes)] 359 | ^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro 360note: required by a bound in `is_into_bytes_11` 361 --> tests/ui-stable/struct.rs:159:24 362 | 363159 | fn is_into_bytes_11<T: IntoBytes>() { 364 | ^^^^^^^^^ required by this bound in `is_into_bytes_11` 365 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info) 366