aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/issue-2767.rs
blob: 9e7e0f983d27af4e3dfd7d3d1b63d265815f7bb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// { dg-additional-options "-frust-edition=2018" }
trait Foo {
    fn f() -> u32;
}

impl Foo for u32 {
    async fn f() -> u32 {
        // { dg-error "functions in traits cannot be declared .async." "" { target *-*-* } .-1 }
        22
    }
}

fn main() {}