error[E0277]: the trait bound `T: KnownLayout` is not satisfied --> tests/ui-stable/mid_compile_pass.rs:63:26 | 63 | fn test_kl13(t: T) -> impl KnownLayout { | ^^^^^^^^^^^^^^^^ the trait `KnownLayout` is not implemented for `T` 64 | KL13(0u8, t) | ------------ return type was inferred to be `KL13` here | = note: Consider adding `#[derive(KnownLayout)]` to `T` note: required for `KL13` to implement `KnownLayout` --> tests/ui-stable/mid_compile_pass.rs:58:10 | 58 | #[derive(KnownLayout)] | ^^^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro = note: this error originates in the derive macro `KnownLayout` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider restricting type parameter `T` with trait `KnownLayout` | 63 | fn test_kl13(t: T) -> impl KnownLayout { | +++++++++++++++++++++++++++++++ error[E0277]: the size for values of type `T` cannot be known at compilation time --> tests/ui-stable/mid_compile_pass.rs:32:15 | 31 | fn test_kl04(kl: &KL04) { | - this type parameter needs to be `Sized` 32 | assert_kl(kl); | --------- ^^ doesn't have a size known at compile-time | | | required by a bound introduced by this call | note: required because it appears within the type `KL04` --> tests/ui-stable/mid_compile_pass.rs:29:8 | 29 | struct KL04(u8, T); | ^^^^ note: required for `KL04` to implement `KnownLayout` --> tests/ui-stable/mid_compile_pass.rs:27:10 | 27 | #[derive(KnownLayout)] | ^^^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro note: required by a bound in `assert_kl` --> tests/ui-stable/mid_compile_pass.rs:23:26 | 23 | fn assert_kl(_: &T) {} | ^^^^^^^^^^^ required by this bound in `assert_kl` = note: this error originates in the derive macro `KnownLayout` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider removing the `?Sized` bound to make the type parameter `Sized` | 31 - fn test_kl04(kl: &KL04) { 31 + fn test_kl04(kl: &KL04) { | error[E0277]: the size for values of type `T` cannot be known at compilation time --> tests/ui-stable/mid_compile_pass.rs:42:15 | 41 | fn test_kl06(kl: &KL06) { | - this type parameter needs to be `Sized` 42 | assert_kl(kl); | --------- ^^ doesn't have a size known at compile-time | | | required by a bound introduced by this call | note: required because it appears within the type `KL06` --> tests/ui-stable/mid_compile_pass.rs:39:8 | 39 | struct KL06(u8, T); | ^^^^ note: required for `KL06` to implement `KnownLayout` --> tests/ui-stable/mid_compile_pass.rs:37:10 | 37 | #[derive(KnownLayout)] | ^^^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro note: required by a bound in `assert_kl` --> tests/ui-stable/mid_compile_pass.rs:23:26 | 23 | fn assert_kl(_: &T) {} | ^^^^^^^^^^^ required by this bound in `assert_kl` = note: this error originates in the derive macro `KnownLayout` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider removing the `?Sized` bound to make the type parameter `Sized` | 41 - fn test_kl06(kl: &KL06) { 41 + fn test_kl06(kl: &KL06) { | error[E0277]: the trait bound `KL12: KnownLayout` is not satisfied --> tests/ui-stable/mid_compile_pass.rs:53:15 | 53 | assert_kl(kl) | --------- ^^ the trait `KnownLayout` is not implemented for `KL12` | | | required by a bound introduced by this call | note: required for `KL12` to implement `KnownLayout` --> tests/ui-stable/mid_compile_pass.rs:47:10 | 47 | #[derive(KnownLayout)] | ^^^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro note: required by a bound in `assert_kl` --> tests/ui-stable/mid_compile_pass.rs:23:26 | 23 | fn assert_kl(_: &T) {} | ^^^^^^^^^^^ required by this bound in `assert_kl` = note: this error originates in the derive macro `KnownLayout` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider borrowing here | 53 | assert_kl(&kl) | + 53 | assert_kl(&mut kl) | ++++