]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/in-trait/object-safety.rs
Auto merge of #103390 - compiler-errors:metadata-mod-regions, r=eholk
[rust.git] / src / test / ui / async-await / in-trait / object-safety.rs
1 // edition:2021
2
3 #![feature(async_fn_in_trait)]
4 //~^ WARN the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
5
6 trait Foo {
7     async fn foo(&self);
8 }
9
10 fn main() {
11     let x: &dyn Foo = todo!();
12     //~^ ERROR the trait `Foo` cannot be made into an object
13 }