rust/tests/ui/async-await/async-fn/not-a-trait.rs
2024-02-16 20:02:50 +00:00

14 lines
234 B
Rust

//@ edition:2018
#![feature(async_closure)]
struct S;
fn test(x: impl async S) {}
//~^ ERROR expected trait, found struct `S`
fn missing(x: impl async Missing) {}
//~^ ERROR cannot find trait `Missing` in this scope
fn main() {}