summaryrefslogtreecommitdiffstats
path: root/src/test/ui/closures/closure-bounds-static-cant-capture-borrowed.rs
blob: 7327d8256685d5ee966b9daeec41195b9bb8cb1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
fn bar<F>(blk: F) where F: FnOnce() + 'static {
}

fn foo(x: &()) {
    bar(|| {
        //~^ ERROR borrowed data escapes
        //~| ERROR closure may outlive
        let _ = x;
    })
}

fn main() {
}