We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00a7b56 commit 87abe17Copy full SHA for 87abe17
src/libstd/ffi/c_str.rs
@@ -446,6 +446,11 @@ impl CString {
446
///
447
/// Failure to call [`from_raw`] will lead to a memory leak.
448
449
+ /// The C side must **not** modify the length of the string (by writing a
450
+ /// `NULL` somewhere inside the string or removing the final one) before
451
+ /// it makes it back into Rust using [`from_raw`]. See the safety section
452
+ /// in [`from_raw`].
453
+ ///
454
/// [`from_raw`]: #method.from_raw
455
456
/// # Examples
0 commit comments