rust/src/test/run-pass/borrowck-root-while-cond.rs

7 lines
112 B
Rust

fn borrow<T>(x: &r/T) -> &r/T {x}
fn main() {
let rec = @{mut f: @22};
while *borrow(rec.f) == 23 {}
}