rust/src/test/ui/borrowck/borrowck-assign-to-andmut-in-borrowed-loc.stderr
2018-12-25 21:08:33 -07:00

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:18: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`.