Closed
Description
openedon Jul 15, 2015
STR
fn main() {
let x = Box::new(0);
println!("{}", *x + { drop(x); let _ = Box::new(main); 0 });
}
Expected Results
If this code compiles, it should print 0
.
Actual Results
Garbage is printed (the address of main
, in fact).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment