Debian Codegraph @

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