mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-25 21:19:35 +01:00
25 lines
1 KiB
Text
25 lines
1 KiB
Text
error[E0499]: cannot borrow `c.shared` as mutable more than once at a time
|
|
--> ui/lockall_borrow_shared.rs:20:9
|
|
|
|
|
20 | c.shared.lock(|_| {
|
|
| ^ ---- --- first mutable borrow occurs here
|
|
| | |
|
|
| _________| first borrow later used by call
|
|
| |
|
|
21 | | c.shared.lock(|_| {}); // borrow error
|
|
| | -------- first borrow occurs due to use of `c.shared` in closure
|
|
22 | | });
|
|
| |__________^ second mutable borrow occurs here
|
|
|
|
error[E0499]: cannot borrow `c.shared` as mutable more than once at a time
|
|
--> ui/lockall_borrow_shared.rs:20:23
|
|
|
|
|
20 | c.shared.lock(|_| {
|
|
| - ---- ^^^ second mutable borrow occurs here
|
|
| | |
|
|
| _________| first borrow later used by call
|
|
| |
|
|
21 | | c.shared.lock(|_| {}); // borrow error
|
|
| | -------- second borrow occurs due to use of `c.shared` in closure
|
|
22 | | });
|
|
| |__________- first mutable borrow occurs here
|