Debian Codegraph @

third_party/rust/zerocopy-derive/tests/ui-msrv/mid_compile_pass.stderr

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