rust/src/test/compile-fail/liveness-init-plus-equal.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

9 lines
130 B
Rust

fn test() {
let mut v: int;
v = v + 1; //! ERROR use of possibly uninitialized variable: `v`
copy v;
}
fn main() {
}