2012-07-19 22:13:00 -05:00
|
|
|
enum foo = ~int;
|
|
|
|
|
|
|
|
fn borrow(x: @mut foo) {
|
2012-09-11 23:25:01 -05:00
|
|
|
let _y = &***x; //~ ERROR illegal borrow unless pure
|
2012-07-19 22:13:00 -05:00
|
|
|
*x = foo(~4); //~ NOTE impure due to assigning to dereference of mutable @ pointer
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
}
|