rust/src/test/run-pass/regions-escape-into-other-fn.rs

8 lines
129 B
Rust
Raw Normal View History

fn foo(x: &r/uint) -> &r/uint { x }
fn bar(x: &uint) -> uint { *x }
fn main() {
let p = @3u;
2012-07-06 11:14:57 -05:00
assert bar(foo(p)) == 3;
}