Closed
Description
fn main() {
let f = proc(_) {};
let g: proc(&()) = f;
}
proc_ref_infer.rs:3:24: 3:25 error: mismatched types: expected `proc(&())` but found `proc(<generic #3>):Send` (expected concrete lifetime, but found bound lifetime parameter &)
proc_ref_infer.rs:3 let g: proc(&()) = f;
^
note: expected concrete lifetime is lifetime ReInfer(ReSkolemized(0u, BrAnon(0u)))
proc_ref_infer.rs:2:9: 2:23 error: cannot determine a type for this local variable: unconstrained type
proc_ref_infer.rs:2 let f = proc(_) {};
^~~~~~~~~~~~~~
error: aborting due to 2 previous errors
Changing the argument type to something that's not a reference (e.g. just ()
) works fine.