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() {}
|