summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-40510-3.rs
blob: 181263adcbfa8902f7c610634a7658215951a56a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#![allow(unused)]

fn f() {
    let mut x: Vec<()> = Vec::new();

    || {
        || {
            x.push(())
        }
        //~^^^ ERROR captured variable cannot escape `FnMut` closure body
    };
}

fn main() {}