rust/src/test/run-pass/regions-addr-of-ret.rs
Niko Matsakis bd573becf5 change region scope of call arguments, old one was unsound
improve error message to describe kind of deref'd ptr using sigil
2012-05-24 05:19:44 -07:00

10 lines
119 B
Rust

fn f(x : &a.int) -> &a.int {
ret &*x;
}
fn main() {
let three = &3;
log(error, #fmt("%d", *f(three)));
}