rust/tests/ui/async-await/in-trait/issue-104678.rs
Michael Goulet 28d58f6524 Bless tests
2023-10-03 00:37:18 +00:00

33 lines
612 B
Rust

// edition:2021
// check-pass
#![feature(async_fn_in_trait)]
#![allow(incomplete_features)]
use std::future::Future;
pub trait Pool {
type Conn;
#[allow(async_fn_in_trait)]
async fn async_callback<'a, F: FnOnce(&'a Self::Conn) -> Fut, Fut: Future<Output = ()>>(
&'a self,
callback: F,
) -> ();
}
pub struct PoolImpl;
pub struct ConnImpl;
impl Pool for PoolImpl {
type Conn = ConnImpl;
async fn async_callback<'a, F: FnOnce(&'a Self::Conn) -> Fut, Fut: Future<Output = ()>>(
&'a self,
_callback: F,
) -> () {
todo!()
}
}
fn main() {}