1
Fork 0

Add FIXME-s that some types should be transparent

This commit is contained in:
Mikail Bagishov 2019-06-19 23:15:19 +03:00
parent 5e0c6a69e0
commit 740f8db855
No known key found for this signature in database
GPG key ID: 63CF4B1F9D921A40
4 changed files with 30 additions and 0 deletions

View file

@ -18,6 +18,12 @@ pub(crate) struct Buf {
pub inner: Vec<u8>
}
// FIXME:
// `Buf::as_slice` current implementation relies
// on `Slice` being layout-compatible with `[u8]`.
// When attribute privacy is implemented, `Slice` should be annotated as `#[repr(transparent)]`.
// Anyway, `Slice` representation and layout are considered implementation detail, are
// not documented and must not be relied upon.
pub(crate) struct Slice {
pub inner: [u8]
}