Skip to content

Commit 39941e6

Browse files
committed
Fix bootstrap doctest failure
1 parent cb8b901 commit 39941e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: library/std/src/ffi/c_str.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1266,7 +1266,7 @@ impl CStr {
12661266
/// behavior when `ptr` is used inside the `unsafe` block:
12671267
///
12681268
/// ```no_run
1269-
/// # #![allow(unused_must_use, temporary_cstring_as_ptr)]
1269+
/// # #![allow(unused_must_use)] #![cfg_attr(not(bootstrap), allow(temporary_cstring_as_ptr))]
12701270
/// use std::ffi::CString;
12711271
///
12721272
/// let ptr = CString::new("Hello").expect("CString::new failed").as_ptr();

0 commit comments

Comments
 (0)