Closed
Description
Test case:
pure fn view_hash(s: & &str) -> uint {
hash::hash_str(*s) as uint
}
pure fn view_eq(a: & &str, b: & &str) -> bool {
str::eq_slice(*a, *b)
}
fn main() {
let map = send_map::linear::linear_map(view_hash, view_eq);
map.insert("foo", ());
}
Errors:
/home/pcwalton/Source/rust/build/test.rs:11:58: 11:65 error: Unconstrained region variable #3
/home/pcwalton/Source/rust/build/test.rs:11 let map = send_map::linear::linear_map(view_hash, view_eq);
^~~~~~~
/home/pcwalton/Source/rust/build/test.rs:11:58: 11:65 error: Unconstrained region variable #4
/home/pcwalton/Source/rust/build/test.rs:11 let map = send_map::linear::linear_map(view_hash, view_eq);
If the functions become inline lambdas, the problem goes away.
@nikomatsakis, any ideas?