about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNathan Whitaker <nathan.whitaker01@gmail.com>2020-08-18 18:47:52 -0400
committerNathan Whitaker <nathan.whitaker01@gmail.com>2020-10-26 18:19:47 -0400
commitce95122e95b5cb4698fa2a07e747823b64729f59 (patch)
tree9583be907aa682dc0695157231b74aee940922ed
parent8b65df06ce0cf78fd2298c9cd63e1f5beb40525f (diff)
downloadrust-ce95122e95b5cb4698fa2a07e747823b64729f59.tar.gz
rust-ce95122e95b5cb4698fa2a07e747823b64729f59.zip
Update doctest
-rw-r--r--library/std/src/ffi/c_str.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/ffi/c_str.rs b/library/std/src/ffi/c_str.rs
index 6df4eb99259..53966396e11 100644
--- a/library/std/src/ffi/c_str.rs
+++ b/library/std/src/ffi/c_str.rs
@@ -1265,7 +1265,7 @@ impl CStr {
     /// behavior when `ptr` is used inside the `unsafe` block:
     ///
     /// ```no_run
-    /// # #![allow(unused_must_use)]
+    /// # #![allow(unused_must_use)] #![allow(temporary_cstring_as_ptr)]
     /// use std::ffi::CString;
     ///
     /// let ptr = CString::new("Hello").expect("CString::new failed").as_ptr();