2022-09-11 02:42:04 -05:00
|
|
|
// check-pass
|
|
|
|
// edition:2021
|
2023-03-15 20:11:04 -05:00
|
|
|
// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
|
|
|
|
// revisions: current next
|
2022-09-11 02:42:04 -05:00
|
|
|
|
2022-10-04 23:16:05 -05:00
|
|
|
#![feature(async_fn_in_trait, return_position_impl_trait_in_trait)]
|
2022-09-11 02:42:04 -05:00
|
|
|
#![allow(incomplete_features)]
|
|
|
|
|
|
|
|
use std::fmt::Debug;
|
|
|
|
|
|
|
|
trait Foo {
|
2022-10-04 23:16:05 -05:00
|
|
|
async fn baz(&self) -> &str {
|
|
|
|
""
|
2022-09-11 02:42:04 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-04 23:16:05 -05:00
|
|
|
struct Bar;
|
|
|
|
|
|
|
|
impl Foo for Bar {}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let _ = Bar.baz();
|
|
|
|
}
|