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

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

12 lines
193 B
Rust
Raw Normal View History

2019-05-28 18:46:13 +00:00
fn get_closure() -> Box<dyn Fn() -> Vec<u8>> {
2017-06-05 10:35:17 +00:00
let vec = vec![1u8, 2u8];
2017-11-20 12:13:27 +00:00
let closure = move || { //~ ERROR expected a closure
2017-06-05 10:35:17 +00:00
vec
};
Box::new(closure)
}
fn main() {}