Closed steffahn closed 2 years ago
Given that the suggested fix for OwningRef
is to add a lifetime argument, but ARef
already has one, I think the best fix would be just to use the same lifetime argument both for the owner lifetime and as a bound for the target type. So the fix would then be just to make it pub struct ARef<'a, U: 'a + ?Sized>
, or equivalently change the _dummy
to PhantomData<(Rc<()>, &'a U)>
.
Note FYI, that this new restriction on the lifetime parameter is arguably a breaking change, so 0.7.0
is probably going to be more appropriate than 0.6.2
.
Adaptation of Kimundi/owning-ref-rs#71, see that issue for an in-depth explanation, and ideas how to fix this problem