Move /src/test to /tests
This commit is contained in:
parent
ca855e6e42
commit
cf2dff2b1e
27592 changed files with 0 additions and 0 deletions
24
tests/ui/async-await/async-with-closure.rs
Normal file
24
tests/ui/async-await/async-with-closure.rs
Normal file
|
@ -0,0 +1,24 @@
|
|||
// 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() {}
|
Loading…
Add table
Add a link
Reference in a new issue