rust/tests/ui/closure_context/issue-26046-fn-mut.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
167 B
Rust
Raw Normal View History

2019-05-28 13:46:13 -05:00
fn foo() -> Box<dyn Fn()> {
let num = 5;
2017-11-20 06:13:27 -06:00
let closure = || { //~ ERROR expected a closure that
num += 1;
};
Box::new(closure)
}
fn main() {}