rust/src/test/run-pass/regions-borrow-at.rs

11 lines
133 B
Rust
Raw Normal View History

2012-04-13 15:36:39 -05:00
fn foo(x: &uint) -> uint {
*x
}
fn main() {
let p = @22u;
2012-04-13 15:36:39 -05:00
let r = foo(p);
2012-08-22 19:24:52 -05:00
debug!("r=%u", r);
assert r == 22u;
2012-04-13 15:36:39 -05:00
}