I'm implementing a more compact version of
std::vec::Vec and I'm running into an interesting compilation failure with one of the tests used for the real
Namely, I have a test failure here:
IntoIter type is failing to be covariant!
I actually had this test passing before by having
core::ptr::NonNull be a member of
IntoIter but unfortunately, I was introducing UB by actually passing in a null pointer and my test suite was failing in release mode with an illegal instruction. (Good to know Rust actually optimizes around
So now I've fixed the illegal instruction error but now my iterator type is failing to be covariant and I'm not sure how to convey to the compiler that this test should work.
Let me know if any more information is required. Honestly, I'd rather live with the illegal instruction fix than having this iterator type be covariant but that's probably because I don't have a use-case where covariance matters for the iterator type yet.