12 lines
183 B
Rust
12 lines
183 B
Rust
|
fn foo(x: &mut int) {
|
||
|
let mut a = 3;
|
||
|
let mut _y = &mut *x;
|
||
|
let _z = &mut *_y;
|
||
|
_y = &mut a; //~ ERROR assigning to mutable local variable prohibited
|
||
|
}
|
||
|
|
||
|
fn main() {
|
||
|
}
|
||
|
|
||
|
|