mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
28 lines
414 B
Rust
28 lines
414 B
Rust
//@ known-bug: #131050
|
|
//@ compile-flags: --edition=2021
|
|
|
|
fn query_as<D>() {}
|
|
|
|
async fn create_user() {
|
|
query_as();
|
|
}
|
|
|
|
async fn post_user_filter() -> impl Filter {
|
|
AndThen(&(), || async { create_user().await })
|
|
}
|
|
|
|
async fn get_app() -> impl Send {
|
|
post_user_filter().await
|
|
}
|
|
|
|
trait Filter {}
|
|
|
|
struct AndThen<T, F>(T, F);
|
|
|
|
impl<T, F, R> Filter for AndThen<T, F>
|
|
where
|
|
F: Fn() -> R,
|
|
R: Send,
|
|
{
|
|
}
|