about summary refs log tree commit diff
path: root/library/std/src/ffi/os_str.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/ffi/os_str.rs')
-rw-r--r--library/std/src/ffi/os_str.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/std/src/ffi/os_str.rs b/library/std/src/ffi/os_str.rs
index c305519dd44..f5cef60e126 100644
--- a/library/std/src/ffi/os_str.rs
+++ b/library/std/src/ffi/os_str.rs
@@ -346,6 +346,7 @@ impl OsString {
     ///
     /// let b: Box<OsStr> = s.into_boxed_os_str();
     /// ```
+    #[must_use = "`self` will be dropped if the result is not used"]
     #[stable(feature = "into_boxed_os_str", since = "1.20.0")]
     pub fn into_boxed_os_str(self) -> Box<OsStr> {
         let rw = Box::into_raw(self.inner.into_box()) as *mut OsStr;