]> git.proxmox.com Git - rustc.git/blob - tests/ui/async-await/issue-61452.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / async-await / issue-61452.rs
1 // edition:2018
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() {}