summaryrefslogtreecommitdiffstats
path: root/tests/ui/closure_context/issue-26046-fn-mut.rs
blob: 0a015ea1436c5d69df9138d0a3aec50f2080e72c (plain)
1
2
3
4
5
6
7
8
9
10
11
fn foo() -> Box<dyn Fn()> {
    let num = 5;

    let closure = || { //~ ERROR expected a closure that
        num += 1;
    };

    Box::new(closure)
}

fn main() {}