From 740f8db85572aef58d0734fc60bc2b54862ebbb0 Mon Sep 17 00:00:00 2001 From: Mikail Bagishov Date: Wed, 19 Jun 2019 23:15:19 +0300 Subject: Add FIXME-s that some types should be transparent --- src/libstd/sys_common/os_str_bytes.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/libstd/sys_common') diff --git a/src/libstd/sys_common/os_str_bytes.rs b/src/libstd/sys_common/os_str_bytes.rs index a4961974d89..d734f412bf8 100644 --- a/src/libstd/sys_common/os_str_bytes.rs +++ b/src/libstd/sys_common/os_str_bytes.rs @@ -18,6 +18,12 @@ pub(crate) struct Buf { pub inner: Vec } +// 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] } -- cgit 1.4.1-3-g733a5