Closed
Description
When writing for<'a : 'b> fn(...) -> ...
, the constraint 'a : 'b
is completely ignored by borrowcheck.
This makes it possible to write the following function, which is weird:
fn g<'b>(f : for<'c : 'b> fn(&'c mut i32) -> &'b mut i32) -> &'b mut i32 {
let f2 : for<'c> fn(&'c mut i32) -> &'b mut i32 =
f ; // WTF, we are dropping the constraint 'c : 'b ?
}