]> git.lizzy.rs Git - rust.git/blob - src/test/ui/dst/dst-rvalue.stderr
Rollup merge of #105955 - Nilstrieb:no-trivial-opt-wrappers-we-have-field-accesses...
[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 error[E0277]: the size for values of type `[isize]` cannot be known at compilation time
14   --> $DIR/dst-rvalue.rs:8:37
15    |
16 LL |     let _x: Box<[isize]> = Box::new(*array);
17    |                            -------- ^^^^^^ doesn't have a size known at compile-time
18    |                            |
19    |                            required by a bound introduced by this call
20    |
21    = help: the trait `Sized` is not implemented for `[isize]`
22 note: required by a bound in `Box::<T>::new`
23   --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
24
25 error: aborting due to 2 previous errors
26
27 For more information about this error, try `rustc --explain E0277`.