about summary refs log tree commit diff
path: root/tests/ui/lifetimes/issue-76168-hr-outlives-3.rs
blob: d6fda129e3634ce96e9f03edf6c95150814f303b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//@ edition:2018

#![feature(unboxed_closures)]
use std::future::Future;

async fn wrapper<F>(f: F)
//~^ 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`
where
F:,
for<'a> <i32 as FnOnce<(&'a mut i32,)>>::Output: Future<Output = ()> + 'a,
//~^ 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`
{
    //~^ ERROR: expected a `FnOnce(&'a mut i32)` closure, found `i32`
    let mut i = 41;
    &mut i;
}

fn main() {}