blob: 19964740a6a7cf93df0c1a2afe74225bdec8c437 (
plain)
1
2
3
4
5
6
7
8
9
|
enum foo = ~int;
fn borrow(x: @mut foo) {
let _y = &***x; //~ ERROR illegal borrow unless pure
*x = foo(~4); //~ NOTE impure due to assigning to dereference of mutable @ pointer
}
fn main() {
}
|