We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cdbe288 commit 45099e6Copy full SHA for 45099e6
library/std/src/ffi/c_str.rs
@@ -672,6 +672,7 @@ impl CString {
672
}
673
674
/// Bypass "move out of struct which implements [`Drop`] trait" restriction.
675
+ #[inline]
676
fn into_inner(self) -> Box<[u8]> {
677
// Rationale: `mem::forget(self)` invalidates the previous call to `ptr::read(&self.inner)`
678
// so we use `ManuallyDrop` to ensure `self` is not dropped.
0 commit comments