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
The traits in this library seem to be implemented for Box, String, etc, which all use Unique instead of NonNull, and other crates using stable_deref_trait don't seem to have issues the AliasedBox of this crate refers to.
Can you explain more in detail the issue(s) using Unique would cause ? From https://doc.rust-lang.org/stable/src/core/ptr/unique.rs.html#14-17 I feel like the usage this crate has would respect these constraints.
The text was updated successfully, but these errors were encountered:
owning_ref is currently unsound because of using Unique - Kimundi/owning-ref-rs#49. In my case i had added a similar test_cell test that was triggering unsoundness with Unique by violating its the referent of the pointer should not be modified without a unique path to its owning Unique. requirement. If it is still confusing, could you be more precise in what to explain more?
stable_deref_trait also has soundness issue(Storyyeller/stable_deref_trait#10) which is why i didn't use it. Although now I have looked into this issue again, and IIRC recently third option for solving it was finally implemented in rust core. So apparently it is fixed and I will see again if i can use it. At first glance just implementing StableDeref for AliasedBox should be enough, but then i would have to forbid Box somehow. Also same should be done for Vec. For now it looks like it would be better to wait until similar issue rust-lang/rust#63818 in rust compiler is fixed, to implement mine in the same way.
Regarding this comment: https://docs.rs/gsrs/0.1.4/src/gsrs/lib.rs.html#135-138
It seems this "collection trait" already exists as a library: https://lib.rs/crates/stable_deref_trait
The traits in this library seem to be implemented for Box, String, etc, which all use Unique instead of NonNull, and other crates using
stable_deref_trait
don't seem to have issues theAliasedBox
of this crate refers to.Can you explain more in detail the issue(s) using
Unique
would cause ? From https://doc.rust-lang.org/stable/src/core/ptr/unique.rs.html#14-17 I feel like the usage this crate has would respect these constraints.The text was updated successfully, but these errors were encountered: