summaryrefslogtreecommitdiffstats
path: root/src/test/ui/dst/dst-rvalue.rs
blob: b52a95a701f540fe10fd63894420f7350b4367dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// Check that dynamically sized rvalues are forbidden

#![feature(box_syntax)]

pub fn main() {
    let _x: Box<str> = box *"hello world";
    //~^ ERROR E0277

    let array: &[isize] = &[1, 2, 3];
    let _x: Box<[isize]> = box *array;
    //~^ ERROR E0277
}