rust/tests/ui/async-await/in-trait/object-safety.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
195 B
Rust
Raw Normal View History

// edition:2021
#![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
}