Debian Codegraph @

debian/missing-sources/zerocopy-derive/tests/ui-stable/mid_compile_pass.stderr

raw
1 error[E0277]: the trait bound `T: KnownLayout` is not satisfied
2 --> tests/ui-stable/mid_compile_pass.rs:63:26
3 |
4 63 | fn test_kl13<T>(t: T) -> impl KnownLayout {
5 | ^^^^^^^^^^^^^^^^ the trait `KnownLayout` is not implemented for `T`
6 64 | KL13(0u8, t)
7 | ------------ return type was inferred to be `KL13<T>` here
8 |
9 = note: Consider adding `#[derive(KnownLayout)]` to `T`
10 note: required for `KL13<T>` to implement `KnownLayout`
11 --> tests/ui-stable/mid_compile_pass.rs:58:10
12 |
13 58 | #[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)
16 help: consider restricting type parameter `T` with trait `KnownLayout`
17 |
18 63 | fn test_kl13<T: zerocopy_renamed::KnownLayout>(t: T) -> impl KnownLayout {
19 | +++++++++++++++++++++++++++++++
20
21 error[E0277]: the size for values of type `T` cannot be known at compilation time
22 --> tests/ui-stable/mid_compile_pass.rs:32:15
23 |
24 31 | fn test_kl04<T: ?Sized>(kl: &KL04<T>) {
25 | - this type parameter needs to be `Sized`
26 32 | assert_kl(kl);
27 | --------- ^^ doesn't have a size known at compile-time
28 | |
29 | required by a bound introduced by this call
30 |
31 note: required because it appears within the type `KL04<T>`
32 --> tests/ui-stable/mid_compile_pass.rs:29:8
33 |
34 29 | struct KL04<T: ?Sized>(u8, T);
35 | ^^^^
36 note: required for `KL04<T>` to implement `KnownLayout`
37 --> tests/ui-stable/mid_compile_pass.rs:27:10
38 |
39 27 | #[derive(KnownLayout)]
40 | ^^^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
41 note: required by a bound in `assert_kl`
42 --> tests/ui-stable/mid_compile_pass.rs:23:26
43 |
44 23 | 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)
47 help: consider removing the `?Sized` bound to make the type parameter `Sized`
48 |
49 31 - fn test_kl04<T: ?Sized>(kl: &KL04<T>) {
50 31 + fn test_kl04<T>(kl: &KL04<T>) {
51 |
52
53 error[E0277]: the size for values of type `T` cannot be known at compilation time
54 --> tests/ui-stable/mid_compile_pass.rs:42:15
55 |
56 41 | fn test_kl06<T: ?Sized + KnownLayout>(kl: &KL06<T>) {
57 | - this type parameter needs to be `Sized`
58 42 | assert_kl(kl);
59 | --------- ^^ doesn't have a size known at compile-time
60 | |
61 | required by a bound introduced by this call
62 |
63 note: required because it appears within the type `KL06<T>`
64 --> tests/ui-stable/mid_compile_pass.rs:39:8
65 |
66 39 | struct KL06<T: ?Sized + KnownLayout>(u8, T);
67 | ^^^^
68 note: required for `KL06<T>` to implement `KnownLayout`
69 --> tests/ui-stable/mid_compile_pass.rs:37:10
70 |
71 37 | #[derive(KnownLayout)]
72 | ^^^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
73 note: required by a bound in `assert_kl`
74 --> tests/ui-stable/mid_compile_pass.rs:23:26
75 |
76 23 | 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)
79 help: consider removing the `?Sized` bound to make the type parameter `Sized`
80 |
81 41 - fn test_kl06<T: ?Sized + KnownLayout>(kl: &KL06<T>) {
82 41 + fn test_kl06<T: KnownLayout>(kl: &KL06<T>) {
83 |
84
85 error[E0277]: the trait bound `KL12<T>: KnownLayout` is not satisfied
86 --> tests/ui-stable/mid_compile_pass.rs:53:15
87 |
88 53 | assert_kl(kl)
89 | --------- ^^ the trait `KnownLayout` is not implemented for `KL12<T>`
90 | |
91 | required by a bound introduced by this call
92 |
93 note: required for `KL12<T>` to implement `KnownLayout`
94 --> tests/ui-stable/mid_compile_pass.rs:47:10
95 |
96 47 | #[derive(KnownLayout)]
97 | ^^^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
98 note: required by a bound in `assert_kl`
99 --> tests/ui-stable/mid_compile_pass.rs:23:26
100 |
101 23 | 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)
104 help: consider borrowing here
105 |
106 53 | assert_kl(&kl)
107 | +
108 53 | assert_kl(&mut kl)
109 | ++++