1error[E0277]: the trait bound `T: KnownLayout` is not satisfied 2 --> tests/ui-stable/mid_compile_pass.rs:59:26 3 | 459 | fn test_kl13<T>(t: T) -> impl KnownLayout { 5 | ^^^^^^^^^^^^^^^^ the trait `KnownLayout` is not implemented for `T` 660 | KL13(0u8, t) 7 | ------------ return type was inferred to be `KL13<T>` here 8 | 9 = note: Consider adding `#[derive(KnownLayout)]` to `T` 10note: required for `KL13<T>` to implement `KnownLayout` 11 --> tests/ui-stable/mid_compile_pass.rs:55:10 12 | 1355 | #[derive(KnownLayout)] 14 | ^^^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro 15 = note: this error originates in the derive macro `KnownLayout` (in Nightly builds, run with -Z macro-backtrace for more info) 16help: consider restricting type parameter `T` with trait `KnownLayout` 17 | 1859 | fn test_kl13<T: zerocopy::KnownLayout>(t: T) -> impl KnownLayout { 19 | +++++++++++++++++++++++ 20 21error[E0277]: the size for values of type `T` cannot be known at compilation time 22 --> tests/ui-stable/mid_compile_pass.rs:31:15 23 | 2430 | fn test_kl04<T: ?Sized>(kl: &KL04<T>) { 25 | - this type parameter needs to be `Sized` 2631 | assert_kl(kl); 27 | --------- ^^ doesn't have a size known at compile-time 28 | | 29 | required by a bound introduced by this call 30 | 31note: required because it appears within the type `KL04<T>` 32 --> tests/ui-stable/mid_compile_pass.rs:28:8 33 | 3428 | struct KL04<T: ?Sized>(u8, T); 35 | ^^^^ 36note: required for `KL04<T>` to implement `KnownLayout` 37 --> tests/ui-stable/mid_compile_pass.rs:27:10 38 | 3927 | #[derive(KnownLayout)] 40 | ^^^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro 41note: required by a bound in `assert_kl` 42 --> tests/ui-stable/mid_compile_pass.rs:23:26 43 | 4423 | fn assert_kl<T: ?Sized + KnownLayout>(_: &T) {} 45 | ^^^^^^^^^^^ required by this bound in `assert_kl` 46 = note: this error originates in the derive macro `KnownLayout` (in Nightly builds, run with -Z macro-backtrace for more info) 47help: consider removing the `?Sized` bound to make the type parameter `Sized` 48 | 4930 - fn test_kl04<T: ?Sized>(kl: &KL04<T>) { 5030 + fn test_kl04<T>(kl: &KL04<T>) { 51 | 52 53error[E0277]: the size for values of type `T` cannot be known at compilation time 54 --> tests/ui-stable/mid_compile_pass.rs:40:15 55 | 5639 | fn test_kl06<T: ?Sized + KnownLayout>(kl: &KL06<T>) { 57 | - this type parameter needs to be `Sized` 5840 | assert_kl(kl); 59 | --------- ^^ doesn't have a size known at compile-time 60 | | 61 | required by a bound introduced by this call 62 | 63note: required because it appears within the type `KL06<T>` 64 --> tests/ui-stable/mid_compile_pass.rs:37:8 65 | 6637 | struct KL06<T: ?Sized + KnownLayout>(u8, T); 67 | ^^^^ 68note: required for `KL06<T>` to implement `KnownLayout` 69 --> tests/ui-stable/mid_compile_pass.rs:36:10 70 | 7136 | #[derive(KnownLayout)] 72 | ^^^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro 73note: required by a bound in `assert_kl` 74 --> tests/ui-stable/mid_compile_pass.rs:23:26 75 | 7623 | fn assert_kl<T: ?Sized + KnownLayout>(_: &T) {} 77 | ^^^^^^^^^^^ required by this bound in `assert_kl` 78 = note: this error originates in the derive macro `KnownLayout` (in Nightly builds, run with -Z macro-backtrace for more info) 79help: consider removing the `?Sized` bound to make the type parameter `Sized` 80 | 8139 - fn test_kl06<T: ?Sized + KnownLayout>(kl: &KL06<T>) { 8239 + fn test_kl06<T: KnownLayout>(kl: &KL06<T>) { 83 | 84 85error[E0277]: the trait bound `KL12<T>: KnownLayout` is not satisfied 86 --> tests/ui-stable/mid_compile_pass.rs:50:15 87 | 8850 | assert_kl(kl) 89 | --------- ^^ the trait `KnownLayout` is not implemented for `KL12<T>` 90 | | 91 | required by a bound introduced by this call 92 | 93note: required for `KL12<T>` to implement `KnownLayout` 94 --> tests/ui-stable/mid_compile_pass.rs:45:10 95 | 9645 | #[derive(KnownLayout)] 97 | ^^^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro 98note: required by a bound in `assert_kl` 99 --> tests/ui-stable/mid_compile_pass.rs:23:26 100 | 10123 | fn assert_kl<T: ?Sized + KnownLayout>(_: &T) {} 102 | ^^^^^^^^^^^ required by this bound in `assert_kl` 103 = note: this error originates in the derive macro `KnownLayout` (in Nightly builds, run with -Z macro-backtrace for more info) 104help: consider borrowing here 105 | 10650 | assert_kl(&kl) 107 | + 10850 | assert_kl(&mut kl) 109 | ++++ 110