rust/src/test/run-pass/regions-addr-of-ret.rs

10 lines
122 B
Rust
Raw Normal View History

fn f(x : &a/int) -> &a/int {
2012-08-01 19:30:05 -05:00
return &*x;
}
fn main() {
let three = &3;
2012-08-22 19:24:52 -05:00
log(error, fmt!("%d", *f(three)));
}