]> git.lizzy.rs Git - rust.git/blob - src/test/ui/box/into-boxed-slice-fail.stderr
Rollup merge of #105419 - YC:issue-41731, r=petrochenkov
[rust.git] / src / test / ui / box / into-boxed-slice-fail.stderr
1 error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
2   --> $DIR/into-boxed-slice-fail.rs:7:35
3    |
4 LL |     let _ = Box::into_boxed_slice(boxed_slice);
5    |             --------------------- ^^^^^^^^^^^ doesn't have a size known at compile-time
6    |             |
7    |             required by a bound introduced by this call
8    |
9    = help: the trait `Sized` is not implemented for `[u8]`
10 note: required by a bound in `Box::<T, A>::into_boxed_slice`
11   --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
12
13 error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
14   --> $DIR/into-boxed-slice-fail.rs:7:13
15    |
16 LL |     let _ = Box::into_boxed_slice(boxed_slice);
17    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
18    |
19    = help: the trait `Sized` is not implemented for `[u8]`
20    = note: slice and array elements must have `Sized` type
21
22 error[E0277]: the size for values of type `dyn Debug` cannot be known at compilation time
23   --> $DIR/into-boxed-slice-fail.rs:11:35
24    |
25 LL |     let _ = Box::into_boxed_slice(boxed_trait);
26    |             --------------------- ^^^^^^^^^^^ doesn't have a size known at compile-time
27    |             |
28    |             required by a bound introduced by this call
29    |
30    = help: the trait `Sized` is not implemented for `dyn Debug`
31 note: required by a bound in `Box::<T, A>::into_boxed_slice`
32   --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
33
34 error[E0277]: the size for values of type `dyn Debug` cannot be known at compilation time
35   --> $DIR/into-boxed-slice-fail.rs:11:13
36    |
37 LL |     let _ = Box::into_boxed_slice(boxed_trait);
38    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
39    |
40    = help: the trait `Sized` is not implemented for `dyn Debug`
41    = note: slice and array elements must have `Sized` type
42
43 error: aborting due to 4 previous errors
44
45 For more information about this error, try `rustc --explain E0277`.