-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Try add covariance for containers #170
Comments
I doubt that lifetime variance has any effect on optimizations. AFAIK that's all erased by the time code goes to LLVM, and I'd expect that any |
Of course, it's just that there's currently no nonaliased covariant pointer for rust, so the only option is maybe aliased covariant |
I just bumped into this issue while replacing a
The consuming code rightfully expects EDIT: Is there any workaround for that issue ? |
Enables a small(?) but valid set of cases. May come with a small penalty, until we have
Unique
built-in. Tho it seems like even in stdUnique<T>
does not enable appropriate optimizations currently, based on my experiments withstd::vec::Vec
. On the other handBox
enables "ownership optimizations", maybe due to#[lang = "..."]
attribute.Make sure to benchmark difference.
The text was updated successfully, but these errors were encountered: