mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
12 lines
501 B
Plaintext
12 lines
501 B
Plaintext
|
error[E0506]: cannot assign to `*y.pointer` because it is borrowed
|
||
|
--> $DIR/borrowck-assign-to-andmut-in-borrowed-loc.rs:28:9
|
||
|
|
|
||
|
LL | let z = copy_borrowed_ptr(&mut y);
|
||
|
| - borrow of `*y.pointer` occurs here
|
||
|
LL | *y.pointer += 1; //~ ERROR cannot assign
|
||
|
| ^^^^^^^^^^^^^^^ assignment to borrowed `*y.pointer` occurs here
|
||
|
|
||
|
error: aborting due to previous error
|
||
|
|
||
|
For more information about this error, try `rustc --explain E0506`.
|