mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
25 lines
439 B
Rust
25 lines
439 B
Rust
//@ build-pass (FIXME(62277): could be check-pass?)
|
|
//@ edition:2018
|
|
|
|
trait MyClosure {
|
|
type Args;
|
|
}
|
|
|
|
impl<R> MyClosure for dyn FnMut() -> R
|
|
where R: 'static {
|
|
type Args = ();
|
|
}
|
|
|
|
struct MyStream<C: ?Sized + MyClosure> {
|
|
x: C::Args,
|
|
}
|
|
|
|
async fn get_future<C: ?Sized + MyClosure>(_stream: MyStream<C>) {}
|
|
|
|
async fn f() {
|
|
let messages: MyStream<dyn FnMut()> = unimplemented!();
|
|
get_future(messages).await;
|
|
}
|
|
|
|
fn main() {}
|