rust/src/test/compile-fail/unsafe-mutable-alias.rs
2011-07-27 15:54:33 +02:00

6 lines
186 B
Rust

// xfail-stage0
// error-pattern:mutable alias to a variable that roots another alias
fn f(a: &int, b: &mutable int) -> int { b += 1; ret a + b; }
fn main() { let i = 4; log f(i, i); }