rust/src/test/compile-fail/liveness-init-in-fru.rs
Niko Matsakis 0d3811e275 improve liveness so it reports unused vars / dead assignments
doesn't warn about pattern bindings yet though
2012-05-24 09:52:16 -07:00

10 lines
200 B
Rust

// -*- rust -*-
type point = {x: int, y: int};
fn main() {
let mut origin: point;
origin = {x: 10 with origin}; //! ERROR use of possibly uninitialized variable: `origin`
copy origin;
}