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 fix implemented for #716 patches the soundness hole, but results in an API which doesn't properly express the type bounds for when it is sound to call Ref::into_ref, into_mut, into_slice, and into_mut_slice. We should restructure the API so that these methods fail to compile when used with unsound types (core::cell::Ref and core::cell::RefMut), but compile successfully when used with sound types. This will be a breaking change.
The text was updated successfully, but these errors were encountered:
Add `IntoByteSlice` and `IntoByteSliceMut` traits, which extend
`ByteSlice` and `ByteSliceMut`, adding `Into<&[u8]>` and `Into<&mut
[u8]>` bounds respectively. Use these new traits as the bounds in the
`Ref` methods `into_ref`, `into_mut`, `into_slice`, and
`into_mut_slice`. This allows us to remove the post-monomorphization
error which was originally added to patch the soundness hole in #716 in
a backwards-compatible way.
Closes#758
Add `IntoByteSlice` and `IntoByteSliceMut` traits, which extend
`ByteSlice` and `ByteSliceMut`, adding `Into<&[u8]>` and `Into<&mut
[u8]>` bounds respectively. Use these new traits as the bounds in the
`Ref` methods `into_ref`, `into_mut`, `into_slice`, and
`into_mut_slice`. This allows us to remove the post-monomorphization
error which was originally added to patch the soundness hole in #716 in
a backwards-compatible way.
Closes#758
Add `IntoByteSlice` and `IntoByteSliceMut` traits, which extend
`ByteSlice` and `ByteSliceMut`, adding `Into<&[u8]>` and `Into<&mut
[u8]>` bounds respectively. Use these new traits as the bounds in the
`Ref` methods `into_ref`, `into_mut`, `into_slice`, and
`into_mut_slice`. This allows us to remove the post-monomorphization
error which was originally added to patch the soundness hole in #716 in
a backwards-compatible way.
Closes#758
The fix implemented for #716 patches the soundness hole, but results in an API which doesn't properly express the type bounds for when it is sound to call
Ref::into_ref
,into_mut
,into_slice
, andinto_mut_slice
. We should restructure the API so that these methods fail to compile when used with unsound types (core::cell::Ref
andcore::cell::RefMut
), but compile successfully when used with sound types. This will be a breaking change.The text was updated successfully, but these errors were encountered: