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 ? } ```
Activity
eddyb commentedon Mar 13, 2017
cc @nikomatsakis
petrochenkov commentedon Mar 13, 2017
Same as #23051
eddyb commentedon Mar 13, 2017
@petrochenkov Ahh I tried looking for an existing issue but I couldn't (wrong keywords used), thanks!
jhjourdan commentedon Mar 13, 2017
Ah, indeed. Sorry for the noise. Closing.