lifetime inference fails on *const &'a T
but succeeds for *mut &'a T
-- why?
#21422
Labels
A-lifetimes
Area: Lifetimes / regions
Intuitively, I would think that replacing an occurrence of
*mut T
with*const T
is just loosening constraints.Unfortunately, if you remove too many constraints, apparently lifetime inference fails.
Here is an example reduced down from my attempt to make
Rc<T>
/Box<T>
/Vec<T>
all covariant inT
and getrustc
bootstrapping:Transcript of compilation attempts:
The text was updated successfully, but these errors were encountered: