about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorNathan Whitaker <nathan.whitaker01@gmail.com>2020-10-26 22:09:47 -0400
committerNathan Whitaker <nathan.whitaker01@gmail.com>2020-10-26 22:09:47 -0400
commit39941e6281e8da26ab6dfa776ff9583ec94cba71 (patch)
treeae48b6aea0ac6ba7e3ef20e89478371bdf843c34 /library/std/src
parentcb8b9012dba9e467c052b3cc047e0c7babfcf724 (diff)
downloadrust-39941e6281e8da26ab6dfa776ff9583ec94cba71.tar.gz
rust-39941e6281e8da26ab6dfa776ff9583ec94cba71.zip
Fix bootstrap doctest failure
Diffstat (limited to 'library/std/src')
-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 4a249d72bbc..8c6d6c80402 100644
--- a/library/std/src/ffi/c_str.rs
+++ b/library/std/src/ffi/c_str.rs
@@ -1266,7 +1266,7 @@ impl CStr {
     /// behavior when `ptr` is used inside the `unsafe` block:
     ///
     /// ```no_run
-    /// # #![allow(unused_must_use, temporary_cstring_as_ptr)]
+    /// # #![allow(unused_must_use)] #![cfg_attr(not(bootstrap), allow(temporary_cstring_as_ptr))]
     /// use std::ffi::CString;
     ///
     /// let ptr = CString::new("Hello").expect("CString::new failed").as_ptr();