rust/tests/ui/borrowck/two-phase-multi-mut.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
761 B
Plaintext
Raw Normal View History

2018-04-06 14:00:45 -05:00
error[E0499]: cannot borrow `foo` as mutable more than once at a time
--> $DIR/two-phase-multi-mut.rs:11:5
2018-04-06 14:00:45 -05:00
|
LL | foo.method(&mut foo);
| ^^^^------^--------^
| | | |
| | | first mutable borrow occurs here
| | first borrow later used by call
| second mutable borrow occurs here
2018-04-06 14:00:45 -05:00
error[E0499]: cannot borrow `foo` as mutable more than once at a time
--> $DIR/two-phase-multi-mut.rs:11:16
2018-04-06 14:00:45 -05:00
|
LL | foo.method(&mut foo);
| --- ------ ^^^^^^^^ second mutable borrow occurs here
| | |
| | first borrow later used by call
| first mutable borrow occurs here
2018-04-06 14:00:45 -05:00
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0499`.