]> git.lizzy.rs Git - rust.git/blob - src/test/ui/dst/dst-rvalue.rs
Rollup merge of #97317 - GuillaumeGomez:gui-settings-text-click, r=jsha
[rust.git] / src / test / ui / dst / dst-rvalue.rs
1 // Check that dynamically sized rvalues are forbidden
2
3 #![feature(box_syntax)]
4
5 pub fn main() {
6     let _x: Box<str> = box *"hello world";
7     //~^ ERROR E0277
8
9     let array: &[isize] = &[1, 2, 3];
10     let _x: Box<[isize]> = box *array;
11     //~^ ERROR E0277
12 }