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
I've had two use-cases recently for Ouroboros structs where my borrowed field was already a StableDeref + AliasableDeref pointer.
One was a std::cell::Ref, and one was an std::sync::Arc.
In both cases, it seems significantly costly to make the additional allocation so that it gets wrapped into an AliasableBox, and that doesn't seem necessary for soundness.
It would be nice if we could put an annotation on the borrowed field so that instead of getting wrapped into AliasableBox, it just adds necessary assertions that the type is indeed StableDeref + AliasableDeref, and doesn't wrap it.
The text was updated successfully, but these errors were encountered:
I've had two use-cases recently for Ouroboros structs where my borrowed field was already a
StableDeref + AliasableDeref
pointer.One was a
std::cell::Ref
, and one was anstd::sync::Arc
.In both cases, it seems significantly costly to make the additional allocation so that it gets wrapped into an
AliasableBox
, and that doesn't seem necessary for soundness.It would be nice if we could put an annotation on the borrowed field so that instead of getting wrapped into AliasableBox, it just adds necessary assertions that the type is indeed
StableDeref + AliasableDeref
, and doesn't wrap it.The text was updated successfully, but these errors were encountered: