Skip to content

Commit 535debf

Browse files
authored
Unrolled build for rust-lang#121046
Rollup merge of rust-lang#121046 - camelid:rm-incorrect-compile_fail, r=Nilstrieb Fix incorrect use of `compile_fail` `compile_fail` should only be used when the code is meant to show what *not* to do. In other words, there should be a fundamental flaw in the code. However, in this case, the example is just incomplete, so we should use `ignore` to avoid confusing readers.
2 parents 37b6533 + cd3ba4a commit 535debf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/std/src/process.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ pub struct Child {
171171
/// The handle for writing to the child's standard input (stdin), if it
172172
/// has been captured. You might find it helpful to do
173173
///
174-
/// ```compile_fail,E0425
174+
/// ```ignore (incomplete)
175175
/// let stdin = child.stdin.take().unwrap();
176176
/// ```
177177
///
@@ -183,7 +183,7 @@ pub struct Child {
183183
/// The handle for reading from the child's standard output (stdout), if it
184184
/// has been captured. You might find it helpful to do
185185
///
186-
/// ```compile_fail,E0425
186+
/// ```ignore (incomplete)
187187
/// let stdout = child.stdout.take().unwrap();
188188
/// ```
189189
///
@@ -195,7 +195,7 @@ pub struct Child {
195195
/// The handle for reading from the child's standard error (stderr), if it
196196
/// has been captured. You might find it helpful to do
197197
///
198-
/// ```compile_fail,E0425
198+
/// ```ignore (incomplete)
199199
/// let stderr = child.stderr.take().unwrap();
200200
/// ```
201201
///

0 commit comments

Comments
 (0)