Closed
Description
#35447 replaced a *const T
by a *mut T
in IntoIter<T>
, which changed IntoIter
from being covariant to being invariant. This breaks crates like vec_map
which relied on IntoIter
being invariant, e.g. https://travis-ci.org/asajeffrey/presort/jobs/152720189#L208 has error:
error[E0308]: mismatched types
--> /home/ajeffrey/.cargo/registry/src/github.com-1ecc6299db9ec823/vec_map-0.6.0/src/lib.rs:952:84
|
952 | fn into_iter_covariant<'a, T>(iter: IntoIter<&'static T>) -> IntoIter<&'a T> { iter }
| ^^^^ lifetime mismatch
|
= note: expected type `IntoIter<&'a T>`
= note: found type `IntoIter<&'static T>`
note: the lifetime 'a as defined on the block at 952:81...
--> /home/ajeffrey/.cargo/registry/src/github.com-1ecc6299db9ec823/vec_map-0.6.0/src/lib.rs:952:82
|
952 | fn into_iter_covariant<'a, T>(iter: IntoIter<&'static T>) -> IntoIter<&'a T> { iter }
| ^^^^^^^^
= note: ...does not necessarily outlive the static lifetime
Compiling rustc-serialize v0.3.19
error: aborting due to previous error