clarify CStr lack of layout guarnatees
This commit is contained in:
parent
4e3ce0e782
commit
3e9679e861
@ -20,10 +20,10 @@ use crate::str;
|
|||||||
/// in each pair are borrowed references; the latter are owned
|
/// in each pair are borrowed references; the latter are owned
|
||||||
/// strings.
|
/// strings.
|
||||||
///
|
///
|
||||||
/// Note that this structure is **not** `repr(C)` and is not recommended to be
|
/// Note that this structure does **not** have a guaranteed layout (the `repr(transparent)`
|
||||||
/// placed in the signatures of FFI functions. Instead, safe wrappers of FFI
|
/// notwithstanding) and is not recommended to be placed in the signatures of FFI functions.
|
||||||
/// functions may leverage the unsafe [`CStr::from_ptr`] constructor to provide
|
/// Instead, safe wrappers of FFI functions may leverage the unsafe [`CStr::from_ptr`] constructor
|
||||||
/// a safe interface to other consumers.
|
/// to provide a safe interface to other consumers.
|
||||||
///
|
///
|
||||||
/// [`CString`]: ../../std/ffi/struct.CString.html
|
/// [`CString`]: ../../std/ffi/struct.CString.html
|
||||||
/// [`String`]: ../../std/string/struct.String.html
|
/// [`String`]: ../../std/string/struct.String.html
|
||||||
|
Loading…
x
Reference in New Issue
Block a user