Closed
Description
fn main() {
let x: &i32;
//x; // error: use of possibly uninitialized variable: `x`
println!("{:?}", x as *const _);
}
This is accepted and prints 0x0
everywhere I've tested (rustc 0.13.0-dev (496dc4e) and the playpen). A similar access is allowed to moved values and mutably borrowed values.
I assume I should not be able to access uninitialized values without some unsafe code, although I am new to the language and might be missing something.