summaryrefslogtreecommitdiffstats
path: root/tests/ui/borrowck/borrowck-init-in-fru.rs
blob: c07957ab13973535ae487a02a5a950625ad39755 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#[derive(Clone)]
struct Point {
    x: isize,
    y: isize,
}

fn main() {
    let mut origin: Point;
    origin = Point { x: 10, ..origin };
    //~^ ERROR E0381
    origin.clone();
}