• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1error[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   |
417 | 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]`
11note: required by a bound in `AssertDstIsFromBytes`
12  --> tests/ui-nightly/transmute-mut-dst-unsized.rs:17:32
13   |
1417 | 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
18error[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   |
2117 | 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]`
28note: required by a bound in `AssertDstIsAsBytes`
29  --> tests/ui-nightly/transmute-mut-dst-unsized.rs:17:32
30   |
3117 | 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
35error[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   |
3817 | 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
46error[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   |
4917 | 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]`
53note: required by an implicit `Sized` bound in `MaxAlignsOf`
54  --> src/macro_util.rs
55   |
56   | pub union MaxAlignsOf<T, U> {
57   |                          ^ required by the implicit `Sized` requirement on this type parameter 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
60error[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   |
6317 | 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]`
67note: required by an implicit `Sized` bound in `transmute`
68  --> $RUST/core/src/intrinsics.rs
69   |
70   |     pub fn transmute<Src, Dst>(src: Src) -> Dst;
71   |                           ^^^ required by the implicit `Sized` requirement on this type parameter 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
74error[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   |
7717 | 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]`
81note: required by an implicit `Sized` 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 the implicit `Sized` requirement on this type parameter in `transmute_mut`
86   = note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)
87