summaryrefslogtreecommitdiff
path: root/tests/ui/async-await/in-trait/object-safety.rs
blob: 4edad1512e93ae65969e95266914e559c9edcc03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// edition:2021
// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
// revisions: current next

#![feature(async_fn_in_trait)]

trait Foo {
    async fn foo(&self);
}

fn main() {
    let x: &dyn Foo = todo!();
    //~^ ERROR the trait `Foo` cannot be made into an object
}