summaryrefslogtreecommitdiffstats
path: root/tests/ui/closures/issue-113087.rs
blob: a4edc2f2f0b5d50a1700ef7b6d717d8712215d7b (plain)
1
2
3
4
5
6
7
8
9
10
11
fn some_fn<'a>(_: &'a i32, _: impl FnOnce(&'a i32)) {}

fn main() {
    let some_closure = |_| {};

    for a in [1] {
        some_fn(&a, |c| { //~ ERROR does not live long enough
            some_closure(c);
        });
    }
}