Assert covariance of BTree{Map,Set} and associated iterators#88058
Assert covariance of BTree{Map,Set} and associated iterators#88058nbdd0121 wants to merge 1 commit intorust-lang:masterfrom
BTree{Map,Set} and associated iterators#88058Conversation
|
r? @m-ou-se (rust-highfive has picked a reviewer for you, use r? to override) |
|
There’s also the variance of the lifetime parameter that could be asserted for types like fn iter<'a>(x: Iter<'static, &'static (), &'static ()>) -> Iter<'a, &'a (), &'a ()> {
x
}for |
|
I followed HashMap, which has separate key and value assertions. |
|
Alright, still the covariance of the lifetime argument of |
|
If |
|
In that case I'll just merge the checks into one... otherwise it'll too verbose. As for |
|
It turns out there are already tests for variances, just that they are named |
|
Of course these tests don't cover lifetime parameters, so it might worth doing that. |
Differenceetc are not yet covariant, see #30642.