The syntax you reach for daily, and what the most common compiler errors are telling you.
Run rustc --explain E0382 for the full explanation of any code.
| Code | Meaning | Usual fix |
|---|---|---|
| E0382 | use of moved value | Borrow instead of moving, clone, or restructure so one owner remains. |
| E0499 | two mutable borrows at once | End the first borrow before starting the second; split the data; use indices. |
| E0502 | mutable borrow while immutably borrowed | Finish reading before writing, or copy the value out first. |
| E0505 | moved out while borrowed | Make sure no reference is used after the move. |
| E0506 | assigned to while borrowed | Same remedy as E0502. |
| E0597 | borrowed value does not live long enough | Move the owner to an outer scope, or return an owned value. |
| E0106 | missing lifetime specifier | Say which input the returned reference borrows from, or return an owned value. |
| E0277 | trait bound not satisfied | Add the bound to your generic, implement or derive the trait, or convert the type. |
| E0308 | mismatched types | Check for a stray semicolon, a missing conversion, or branches of different types. |
| E0282 | type annotations needed | Annotate the binding or use the turbofish: parse::<i32>(). |
| E0004 | non-exhaustive patterns | Handle the listed cases. |
| E0373 | closure may outlive borrowed value | Add move to the closure. |