Even with C: StableDeref, moving the cart can potentially invalidate the yoke.
However, miri does not by default report any errors when using yoke. This is due to the fact that miri's aliasing analysis/retagging does not by-default recurse into private fields, so the box's uniqueness is never asserted, along with never giving mutable access to the carted data meaning uniqueness never needs to be asserted. -Zmiri-retag-fields exists to opt into the retagging of fields, which will surface this potential UB.
This is mostly to note that this potential issue is known; feel free to close if this is considered a non-issue.
Related:
Even with
C: StableDeref, moving the cart can potentially invalidate the yoke.However, miri does not by default report any errors when using yoke. This is due to the fact that miri's aliasing analysis/retagging does not by-default recurse into private fields, so the box's uniqueness is never asserted, along with never giving mutable access to the carted data meaning uniqueness never needs to be asserted.
-Zmiri-retag-fieldsexists to opt into the retagging of fields, which will surface this potential UB.This is mostly to note that this potential issue is known; feel free to close if this is considered a non-issue.
Related:
noaliasKimundi/owning-ref-rs#49