blob: 86747dad00ddb5d735d1fd85d89551f031c3d786 [file] [log] [blame]
// Check that dynamically sized rvalues are forbidden
#![feature(box_syntax)]
pub fn main() {
let _x: Box<str> = box *"hello world";
//~^ ERROR E0161
//~^^ ERROR cannot move out of borrowed content
let array: &[isize] = &[1, 2, 3];
let _x: Box<[isize]> = box *array;
//~^ ERROR E0161
//~^^ ERROR cannot move out of borrowed content
}