rust/tests/ui/async-await/in-trait/object-safety.rs
2023-10-13 21:01:36 +00:00

12 lines
164 B
Rust

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