Debian Codegraph @

third_party/rust/zerocopy/tests/ui-stable/transmute-ref-dst-unsized.stderr

raw
1 error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
2 --> tests/ui-stable/transmute-ref-dst-unsized.rs:17:28
3 |
4 17 | const DST_UNSIZED: &[u8] = transmute_ref!(&[0u8; 1]);
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^
6 | |
7 | doesn't have a size known at compile-time
8 | required by a bound introduced by this call
9 |
10 = help: the trait `Sized` is not implemented for `[u8]`
11 note: required by a bound in `AssertIsFromBytes`
12 --> tests/ui-stable/transmute-ref-dst-unsized.rs:17:28
13 |
14 17 | const DST_UNSIZED: &[u8] = transmute_ref!(&[0u8; 1]);
15 | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `AssertIsFromBytes`
16 = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
17
18 error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
19 --> tests/ui-stable/transmute-ref-dst-unsized.rs:17:28
20 |
21 17 | const DST_UNSIZED: &[u8] = transmute_ref!(&[0u8; 1]);
22 | ^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
23 |
24 = help: the trait `Sized` is not implemented for `[u8]`
25 = note: all local variables must have a statically known size
26 = help: unsized locals are gated as an unstable feature
27 = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
28
29 error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
30 --> tests/ui-stable/transmute-ref-dst-unsized.rs:17:28
31 |
32 17 | const DST_UNSIZED: &[u8] = transmute_ref!(&[0u8; 1]);
33 | ^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
34 |
35 = help: the trait `Sized` is not implemented for `[u8]`
36 note: required by a bound in `MaxAlignsOf`
37 --> src/macro_util.rs
38 |
39 | pub union MaxAlignsOf<T, U> {
40 | ^ required by this bound in `MaxAlignsOf`
41 = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
42
43 error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
44 --> tests/ui-stable/transmute-ref-dst-unsized.rs:17:28
45 |
46 17 | const DST_UNSIZED: &[u8] = transmute_ref!(&[0u8; 1]);
47 | ^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
48 |
49 = help: the trait `Sized` is not implemented for `[u8]`
50 note: required by a bound in `transmute`
51 --> $RUST/core/src/intrinsics.rs
52 |
53 | pub fn transmute<Src, Dst>(src: Src) -> Dst;
54 | ^^^ required by this bound in `transmute`
55 = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
56
57 error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
58 --> tests/ui-stable/transmute-ref-dst-unsized.rs:17:28
59 |
60 17 | const DST_UNSIZED: &[u8] = transmute_ref!(&[0u8; 1]);
61 | ^^^^^^^^^^^^^^^^^^^^^^^^^
62 | |
63 | doesn't have a size known at compile-time
64 | required by a bound introduced by this call
65 |
66 = help: the trait `Sized` is not implemented for `[u8]`
67 note: required by a bound in `MaxAlignsOf::<T, U>::new`
68 --> src/macro_util.rs
69 |
70 | impl<T, U> MaxAlignsOf<T, U> {
71 | ^ required by this bound in `MaxAlignsOf::<T, U>::new`
72 | #[inline(never)] // Make `missing_inline_in_public_items` happy.
73 | pub fn new(_t: T, _u: U) -> MaxAlignsOf<T, U> {
74 | --- required by a bound in this associated function
75 = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
76
77 error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
78 --> tests/ui-stable/transmute-ref-dst-unsized.rs:17:28
79 |
80 17 | const DST_UNSIZED: &[u8] = transmute_ref!(&[0u8; 1]);
81 | ^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
82 |
83 = help: the trait `Sized` is not implemented for `[u8]`
84 note: required by a bound in `transmute_ref`
85 --> src/macro_util.rs
86 |
87 | pub const unsafe fn transmute_ref<'dst, 'src: 'dst, Src: 'src, Dst: 'dst>(
88 | ^^^ required by this bound in `transmute_ref`
89 = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)