| 1 |
error[E0277]: the trait bound `T: KnownLayout` is not satisfied |
| 2 |
--> tests/ui-msrv/mid_compile_pass.rs:59:26 |
| 3 |
| |
| 4 |
59 | fn test_kl13<T>(t: T) -> impl KnownLayout { |
| 5 |
| ^^^^^^^^^^^^^^^^ the trait `KnownLayout` is not implemented for `T` |
| 6 |
| |
| 7 |
note: required because of the requirements on the impl of `KnownLayout` for `KL13<T>` |
| 8 |
--> tests/ui-msrv/mid_compile_pass.rs:55:10 |
| 9 |
| |
| 10 |
55 | #[derive(KnownLayout)] |
| 11 |
| ^^^^^^^^^^^ |
| 12 |
= note: this error originates in the derive macro `KnownLayout` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 13 |
help: consider restricting type parameter `T` |
| 14 |
| |
| 15 |
59 | fn test_kl13<T: zerocopy::KnownLayout>(t: T) -> impl KnownLayout { |
| 16 |
| +++++++++++++++++++++++ |
| 17 |
|
| 18 |
error[E0277]: the size for values of type `T` cannot be known at compilation time |
| 19 |
--> tests/ui-msrv/mid_compile_pass.rs:31:15 |
| 20 |
| |
| 21 |
30 | fn test_kl04<T: ?Sized>(kl: &KL04<T>) { |
| 22 |
| - this type parameter needs to be `std::marker::Sized` |
| 23 |
31 | assert_kl(kl); |
| 24 |
| ^^ doesn't have a size known at compile-time |
| 25 |
| |
| 26 |
note: required because it appears within the type `KL04<T>` |
| 27 |
--> tests/ui-msrv/mid_compile_pass.rs:28:8 |
| 28 |
| |
| 29 |
28 | struct KL04<T: ?Sized>(u8, T); |
| 30 |
| ^^^^ |
| 31 |
note: required because of the requirements on the impl of `KnownLayout` for `KL04<T>` |
| 32 |
--> tests/ui-msrv/mid_compile_pass.rs:27:10 |
| 33 |
| |
| 34 |
27 | #[derive(KnownLayout)] |
| 35 |
| ^^^^^^^^^^^ |
| 36 |
note: required by a bound in `assert_kl` |
| 37 |
--> tests/ui-msrv/mid_compile_pass.rs:23:26 |
| 38 |
| |
| 39 |
23 | fn assert_kl<T: ?Sized + KnownLayout>(_: &T) {} |
| 40 |
| ^^^^^^^^^^^ required by this bound in `assert_kl` |
| 41 |
= note: this error originates in the derive macro `KnownLayout` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 42 |
help: consider removing the `?Sized` bound to make the type parameter `Sized` |
| 43 |
| |
| 44 |
30 - fn test_kl04<T: ?Sized>(kl: &KL04<T>) { |
| 45 |
30 + fn test_kl04<T>(kl: &KL04<T>) { |
| 46 |
| |
| 47 |
|
| 48 |
error[E0277]: the size for values of type `T` cannot be known at compilation time |
| 49 |
--> tests/ui-msrv/mid_compile_pass.rs:40:15 |
| 50 |
| |
| 51 |
39 | fn test_kl06<T: ?Sized + KnownLayout>(kl: &KL06<T>) { |
| 52 |
| - this type parameter needs to be `std::marker::Sized` |
| 53 |
40 | assert_kl(kl); |
| 54 |
| ^^ doesn't have a size known at compile-time |
| 55 |
| |
| 56 |
note: required because it appears within the type `KL06<T>` |
| 57 |
--> tests/ui-msrv/mid_compile_pass.rs:37:8 |
| 58 |
| |
| 59 |
37 | struct KL06<T: ?Sized + KnownLayout>(u8, T); |
| 60 |
| ^^^^ |
| 61 |
note: required because of the requirements on the impl of `KnownLayout` for `KL06<T>` |
| 62 |
--> tests/ui-msrv/mid_compile_pass.rs:36:10 |
| 63 |
| |
| 64 |
36 | #[derive(KnownLayout)] |
| 65 |
| ^^^^^^^^^^^ |
| 66 |
note: required by a bound in `assert_kl` |
| 67 |
--> tests/ui-msrv/mid_compile_pass.rs:23:26 |
| 68 |
| |
| 69 |
23 | fn assert_kl<T: ?Sized + KnownLayout>(_: &T) {} |
| 70 |
| ^^^^^^^^^^^ required by this bound in `assert_kl` |
| 71 |
= note: this error originates in the derive macro `KnownLayout` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 72 |
help: consider removing the `?Sized` bound to make the type parameter `Sized` |
| 73 |
| |
| 74 |
39 - fn test_kl06<T: ?Sized + KnownLayout>(kl: &KL06<T>) { |
| 75 |
39 + fn test_kl06<T: KnownLayout>(kl: &KL06<T>) { |
| 76 |
| |
| 77 |
|
| 78 |
error[E0277]: the trait bound `T: KnownLayout` is not satisfied |
| 79 |
--> tests/ui-msrv/mid_compile_pass.rs:50:15 |
| 80 |
| |
| 81 |
50 | assert_kl(kl) |
| 82 |
| ^^ |
| 83 |
| | |
| 84 |
| expected an implementor of trait `KnownLayout` |
| 85 |
| help: consider borrowing here: `&kl` |
| 86 |
| |
| 87 |
note: required because of the requirements on the impl of `KnownLayout` for `KL12<T>` |
| 88 |
--> tests/ui-msrv/mid_compile_pass.rs:45:10 |
| 89 |
| |
| 90 |
45 | #[derive(KnownLayout)] |
| 91 |
| ^^^^^^^^^^^ |
| 92 |
note: required by a bound in `assert_kl` |
| 93 |
--> tests/ui-msrv/mid_compile_pass.rs:23:26 |
| 94 |
| |
| 95 |
23 | fn assert_kl<T: ?Sized + KnownLayout>(_: &T) {} |
| 96 |
| ^^^^^^^^^^^ required by this bound in `assert_kl` |
| 97 |
= note: this error originates in the derive macro `KnownLayout` (in Nightly builds, run with -Z macro-backtrace for more info) |