Skip to content

Commit 872c782

Browse files
committed
Mark doc examples w/ extern blocks as ignore.
Fixes #48218.
1 parent 1ad094d commit 872c782

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/libstd/ffi/c_str.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ use sys;
9191
///
9292
/// # Examples
9393
///
94-
/// ```no_run
94+
/// ```ignore (extern-declaration)
9595
/// # fn main() {
9696
/// use std::ffi::CString;
9797
/// use std::os::raw::c_char;
@@ -150,7 +150,7 @@ pub struct CString {
150150
///
151151
/// Inspecting a foreign C string:
152152
///
153-
/// ```no_run
153+
/// ```ignore (extern-declaration)
154154
/// use std::ffi::CStr;
155155
/// use std::os::raw::c_char;
156156
///
@@ -164,7 +164,7 @@ pub struct CString {
164164
///
165165
/// Passing a Rust-originating C string:
166166
///
167-
/// ```no_run
167+
/// ```ignore (extern-declaration)
168168
/// use std::ffi::{CString, CStr};
169169
/// use std::os::raw::c_char;
170170
///
@@ -180,7 +180,7 @@ pub struct CString {
180180
///
181181
/// Converting a foreign C string into a Rust [`String`]:
182182
///
183-
/// ```no_run
183+
/// ```ignore (extern-declaration)
184184
/// use std::ffi::CStr;
185185
/// use std::os::raw::c_char;
186186
///
@@ -307,7 +307,7 @@ impl CString {
307307
///
308308
/// # Examples
309309
///
310-
/// ```no_run
310+
/// ```ignore (extern-declaration)
311311
/// use std::ffi::CString;
312312
/// use std::os::raw::c_char;
313313
///
@@ -389,7 +389,7 @@ impl CString {
389389
/// Create a `CString`, pass ownership to an `extern` function (via raw pointer), then retake
390390
/// ownership with `from_raw`:
391391
///
392-
/// ```no_run
392+
/// ```ignore (extern-declaration)
393393
/// use std::ffi::CString;
394394
/// use std::os::raw::c_char;
395395
///
@@ -882,7 +882,7 @@ impl CStr {
882882
///
883883
/// # Examples
884884
///
885-
/// ```no_run
885+
/// ```ignore (extern-declaration)
886886
/// # fn main() {
887887
/// use std::ffi::CStr;
888888
/// use std::os::raw::c_char;

0 commit comments

Comments
 (0)