rhs_first_assign
An attribute macro to hack compound assignment.
Motivation
use Wrapping;
error[E0502]: cannot borrow `xs` as immutable because it is also borrowed as mutable
--> src/main.rs:10:14
|
10 | xs[1] += xs[0];
| ---------^^---
| | |
| | immutable borrow occurs here
| mutable borrow occurs here
| mutable borrow later used here
Usage
use rhs_first_assign;
use Wrapping;
↓
use Wrapping;
License
Licensed under MIT OR Apache-2.0.