fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable 2 --> $DIR/issue-61452.rs:4:5 3 | 4LL | x.take(); 5 | ^ cannot borrow as mutable 6 | 7help: consider changing this to be mutable 8 | 9LL | pub async fn f(mut x: Option<usize>) { 10 | +++ 11 12error[E0384]: cannot assign twice to immutable variable `x` 13 --> $DIR/issue-61452.rs:9:5 14 | 15LL | pub async fn g(x: usize) { 16 | - 17 | | 18 | first assignment to `x` 19 | help: consider making this binding mutable: `mut x` 20LL | x += 1; 21 | ^^^^^^ cannot assign twice to immutable variable 22 23error: aborting due to 2 previous errors 24 25Some errors have detailed explanations: E0384, E0596. 26For more information about an error, try `rustc --explain E0384`.