Add FIXME-s that some types should be transparent
This commit is contained in:
parent
5e0c6a69e0
commit
740f8db855
4 changed files with 30 additions and 0 deletions
|
@ -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]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue