]>
Commit | Line | Data |
---|---|---|
dc9dc135 | 1 | // edition:2018 |
dc9dc135 XL |
2 | |
3 | pub async fn f(x: Option<usize>) { | |
4 | x.take(); | |
5 | //~^ ERROR cannot borrow `x` as mutable, as it is not declared as mutable [E0596] | |
6 | } | |
7 | ||
8 | pub async fn g(x: usize) { | |
9 | x += 1; | |
10 | //~^ ERROR cannot assign twice to immutable variable `x` [E0384] | |
11 | } | |
12 | ||
13 | fn main() {} |