]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/issue-61452.stderr
Auto merge of #83152 - guswynn:jemallocator_part2, r=Mark-Simulacrum
[rust.git] / src / test / ui / async-await / issue-61452.stderr
1 error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
2   --> $DIR/issue-61452.rs:4:5
3    |
4 LL | pub async fn f(x: Option<usize>) {
5    |                - help: consider changing this to be mutable: `mut x`
6 LL |     x.take();
7    |     ^ cannot borrow as mutable
8
9 error[E0384]: cannot assign twice to immutable variable `x`
10   --> $DIR/issue-61452.rs:9:5
11    |
12 LL | pub async fn g(x: usize) {
13    |                -
14    |                |
15    |                first assignment to `x`
16    |                help: make this binding mutable: `mut x`
17 LL |     x += 1;
18    |     ^^^^^^ cannot assign twice to immutable variable
19
20 error: aborting due to 2 previous errors
21
22 Some errors have detailed explanations: E0384, E0596.
23 For more information about an error, try `rustc --explain E0384`.