Closed
Description
fn main() {
let mut rec_f = None;
let f: &fn(uint) -> bool = |n| { n == 0 || (*rec_f.get_ref())(n - 1) };
rec_f = Some(f);
}
derived-type.rs:3:47: 3:66 error: the type of this value must be known in this context
derived-type.rs:3 let f: &fn(uint) -> bool = |n| { n == 0 || (*rec_f.get_ref())(n - 1) };
^~~~~~~~~~~~~~~~~~~
derived-type.rs:4:12: 4:20 error: mismatched types: expected `std::option::Option<[type error]>` but found `std::option::Option<&fn<no-bounds>(uint) -> bool>` (expected type error but found fn)
derived-type.rs:4 rec_f = Some(f);
^~~~~~~~
error: aborting due to 2 previous errors