Debian Codegraph @

debian/rust-vendor/zerocopy-derive/tests/ui/mid_compile_pass.msrv.stderr

raw
1 error[E0277]: the trait bound `T: KnownLayout` is not satisfied
2 --> $DIR/mid_compile_pass.rs:67:26
3 |
4 67 | 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 --> $DIR/mid_compile_pass.rs:62:10
9 |
10 62 | #[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 67 | fn test_kl13<T: zerocopy_renamed::KnownLayout>(t: T) -> impl KnownLayout {
16 | +++++++++++++++++++++++++++++++
17
18 error[E0277]: the size for values of type `T` cannot be known at compilation time
19 --> $DIR/mid_compile_pass.rs:32:15
20 |
21 31 | fn test_kl04<T: ?Sized>(kl: &KL04<T>) {
22 | - this type parameter needs to be `std::marker::Sized`
23 32 | 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 --> $DIR/mid_compile_pass.rs:29:8
28 |
29 29 | struct KL04<T: ?Sized>(u8, T);
30 | ^^^^
31 note: required because of the requirements on the impl of `KnownLayout` for `KL04<T>`
32 --> $DIR/mid_compile_pass.rs:27:10
33 |
34 27 | #[derive(KnownLayout)]
35 | ^^^^^^^^^^^
36 note: required by a bound in `assert_kl`
37 --> $DIR/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 31 - fn test_kl04<T: ?Sized>(kl: &KL04<T>) {
45 31 + 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 --> $DIR/mid_compile_pass.rs:43:15
50 |
51 42 | fn test_kl06<T: ?Sized + KnownLayout>(kl: &KL06<T>) {
52 | - this type parameter needs to be `std::marker::Sized`
53 43 | 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 --> $DIR/mid_compile_pass.rs:40:8
58 |
59 40 | struct KL06<T: ?Sized + KnownLayout>(u8, T);
60 | ^^^^
61 note: required because of the requirements on the impl of `KnownLayout` for `KL06<T>`
62 --> $DIR/mid_compile_pass.rs:38:10
63 |
64 38 | #[derive(KnownLayout)]
65 | ^^^^^^^^^^^
66 note: required by a bound in `assert_kl`
67 --> $DIR/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 42 - fn test_kl06<T: ?Sized + KnownLayout>(kl: &KL06<T>) {
75 42 + fn test_kl06<T: KnownLayout>(kl: &KL06<T>) {
76 |
77
78 error[E0277]: the trait bound `T: KnownLayout` is not satisfied
79 --> $DIR/mid_compile_pass.rs:55:15
80 |
81 55 | 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 --> $DIR/mid_compile_pass.rs:49:10
89 |
90 49 | #[derive(KnownLayout)]
91 | ^^^^^^^^^^^
92 note: required by a bound in `assert_kl`
93 --> $DIR/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)
98
99 error: aborting due to 4 previous errors
100
101 For more information about this error, try `rustc --explain E0277`.