You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Decouple next lifetime from self in TaggedStructure::push() and ::extend()
Right now `TaggedStructure::push()` is defined by ash-rs#994 as:
```rs
fn push<T: Extends<Self> + TaggedStructure<'a>>(mut self, next: &'a mut T) -> Self
```
This requires that the extending structure has the same lifetime as
the base structure, which is unnecessarily restricting. Specifically,
even after `self` is no longer live (i.e. it is no longer mutably
borrowing `next`) `next` cannot be accessed mutably as demonstrated
by a new test in commit 4942dc3. The same restriction exists for
`TaggedStructure::extend()`.
This PR decouples lifetime `'a` for `self` from a new lifetime `'b`
for `next` in `push()` and `extend()` to require that the extending
structure outlives the base structure.
0 commit comments