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
Add documented test for using structs after temporarily being part of a mutable pointer chain
This test is based on the trybuild failure test where the root structure
is still being alive and used when one of its pointer-chain members is
being accessed, violating mutable borrow rules.
Note that this pattern still doesn't apply mutable borrow rules to
*longer pointer chains where multiple structs* are pushed to the same
*root struct*, resulting in those structs now referencing each other
via `pNext` even after the root struct goes out of scope. This is
implicitly handled - though not explicitly documented - by all Vulkan
function calls remaining `unsafe` and by `push()` asserting that
incoming structures have `pNext` set to `NULL`.
Unless those structs were pushed into each other manually while
preserving existing `pNext` pointers via `unsafe` `extend()`, which
commonly isn't even possible for arbitrary extension structures that
are not a root structure themselves (i.e. no other structure lists the
extension structure in a `structextends`).
0 commit comments