about summary refs log tree commit diff
path: root/src/libstd/sys_common
diff options
context:
space:
mode:
authorMikail Bagishov <bagishov.mikail@yandex.ru>2019-06-19 23:15:19 +0300
committerMikail Bagishov <bagishov.mikail@yandex.ru>2019-08-09 17:41:40 +0300
commit740f8db85572aef58d0734fc60bc2b54862ebbb0 (patch)
treeae5e737146380e5806379187e97441b53231f8a2 /src/libstd/sys_common
parent5e0c6a69e075d9c7d19e28264bb8941f72ecaf4e (diff)
downloadrust-740f8db85572aef58d0734fc60bc2b54862ebbb0.tar.gz
rust-740f8db85572aef58d0734fc60bc2b54862ebbb0.zip
Add FIXME-s that some types should be transparent
Diffstat (limited to 'src/libstd/sys_common')
-rw-r--r--src/libstd/sys_common/os_str_bytes.rs6
1 files changed, 6 insertions, 0 deletions
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<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]
 }