2013-01-11 21:01:42 -08:00
|
|
|
// error-pattern:borrowed
|
|
|
|
|
2013-05-03 16:26:43 -04:00
|
|
|
// Test that write guards trigger when there is a write to a directly
|
|
|
|
// frozen @mut box.
|
|
|
|
|
2013-01-11 21:01:42 -08:00
|
|
|
fn main() {
|
|
|
|
let x = @mut 3;
|
|
|
|
let y: &mut int = x;
|
2013-04-30 16:35:01 -04:00
|
|
|
let z = x;
|
|
|
|
*z = 5;
|
2013-01-11 21:01:42 -08:00
|
|
|
}
|