]> git.lizzy.rs Git - rust.git/blob - src/test/ui/dst/dst-rvalue.stderr
Rollup merge of #100479 - compiler-errors:argument-type-error-improvements, r=lcnr
[rust.git] / src / test / ui / dst / dst-rvalue.stderr
1 error[E0277]: the size for values of type `str` cannot be known at compilation time
2   --> $DIR/dst-rvalue.rs:4:33
3    |
4 LL |     let _x: Box<str> = Box::new(*"hello world");
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 `str`
10 note: required by a bound in `Box::<T>::new`
11   --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
12    |
13 LL | impl<T> Box<T> {
14    |      ^ required by this bound in `Box::<T>::new`
15
16 error[E0277]: the size for values of type `[isize]` cannot be known at compilation time
17   --> $DIR/dst-rvalue.rs:8:37
18    |
19 LL |     let _x: Box<[isize]> = Box::new(*array);
20    |                            -------- ^^^^^^ doesn't have a size known at compile-time
21    |                            |
22    |                            required by a bound introduced by this call
23    |
24    = help: the trait `Sized` is not implemented for `[isize]`
25 note: required by a bound in `Box::<T>::new`
26   --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
27    |
28 LL | impl<T> Box<T> {
29    |      ^ required by this bound in `Box::<T>::new`
30
31 error: aborting due to 2 previous errors
32
33 For more information about this error, try `rustc --explain E0277`.