rust/tests/ui/borrowck/borrowck-init-in-fru.rs
2023-01-11 09:32:08 +00:00

13 lines
185 B
Rust

#[derive(Clone)]
struct Point {
x: isize,
y: isize,
}
fn main() {
let mut origin: Point;
origin = Point { x: 10, ..origin };
//~^ ERROR E0381
origin.clone();
}