about summary refs log tree commit diff
path: root/tests/ui/async-await/issue-61452.rs
blob: 718f0e9efc13c80f897850e7c922eadc1a37eb34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//@ edition:2018

pub async fn f(x: Option<usize>) {
    x.take();
    //~^ ERROR cannot borrow `x` as mutable, as it is not declared as mutable [E0596]
}

pub async fn g(x: usize) {
    x += 1;
    //~^ ERROR cannot assign twice to immutable variable `x` [E0384]
}

fn main() {}