Debian Codegraph @

third_party/rust/zerocopy/tests/ui-nightly/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-nightly/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-nightly/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-nightly/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-nightly/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-nightly/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-nightly/transmute-ref-dst-unsized.rs:17:28
59 |
60 17 | const DST_UNSIZED: &[u8] = transmute_ref!(&[0u8; 1]);
61 | ^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
62 |
63 = help: the trait `Sized` is not implemented for `[u8]`
64 note: required by a bound in `transmute_ref`
65 --> src/macro_util.rs
66 |
67 | pub const unsafe fn transmute_ref<'dst, 'src: 'dst, Src: 'src, Dst: 'dst>(
68 | ^^^ required by this bound in `transmute_ref`
69 = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)