rust/src/test/ui/mut/mut-cant-alias.stderr

14 lines
450 B
Plaintext
Raw Normal View History

2018-08-08 12:28:26 +00:00
error[E0499]: cannot borrow `b` as mutable more than once at a time
--> $DIR/mut-cant-alias.rs:19:20
2018-08-08 12:28:26 +00:00
|
LL | let b1 = &mut *b;
| - first mutable borrow occurs here
LL | let b2 = &mut *b; //~ ERROR cannot borrow
| ^ second mutable borrow occurs here
LL | }
| - first borrow ends here
error: aborting due to previous error
For more information about this error, try `rustc --explain E0499`.