2023-10-26 06:13:32 -05:00
|
|
|
// edition:2018
|
|
|
|
|
|
|
|
#![feature(unboxed_closures)]
|
|
|
|
use std::future::Future;
|
|
|
|
|
|
|
|
async fn wrapper<F>(f: F)
|
2023-10-04 20:50:00 -05:00
|
|
|
//~^ ERROR: expected a `FnOnce(&'a mut i32)` closure, found `i32`
|
|
|
|
//~| ERROR: expected a `FnOnce(&'a mut i32)` closure, found `i32`
|
|
|
|
//~| ERROR: expected a `FnOnce(&'a mut i32)` closure, found `i32`
|
2023-10-26 06:13:32 -05:00
|
|
|
where
|
|
|
|
F:,
|
|
|
|
for<'a> <i32 as FnOnce<(&'a mut i32,)>>::Output: Future<Output = ()> + 'a,
|
|
|
|
{
|
2023-10-04 20:50:00 -05:00
|
|
|
//~^ ERROR: expected a `FnOnce(&'a mut i32)` closure, found `i32`
|
2023-10-26 06:13:32 -05:00
|
|
|
let mut i = 41;
|
|
|
|
&mut i;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|