rust/src/test/compile-fail/liveness-swap-uninit.rs

7 lines
123 B
Rust
Raw Normal View History

fn main() {
let mut x = 3;
let y;
x <-> y; //! ERROR use of possibly uninitialized variable: `y`
copy x;
}