about summary refs log tree commit diff
path: root/tests/ui/traits/const-traits/ice-120503-async-const-method.rs
blob: 4c337a42a68a75c3c107de01156f82067cf7c1d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//@ edition: 2021

trait MyTrait {}

impl MyTrait for i32 {
    async const fn bar(&self) {
        //~^ ERROR expected one of `extern`
        //~| ERROR functions in trait impls cannot be declared const
        //~| ERROR functions cannot be both `const` and `async`
        //~| ERROR method `bar` is not a member
        main8().await;
        //~^ ERROR cannot find function
    }
}

fn main() {}