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