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