Skip to content

Commit

Permalink
Unrolled build for rust-lang#121046
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rust-timer authored Feb 14, 2024
2 parents 37b6533 + cd3ba4a commit 535debf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/std/src/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ pub struct Child {
/// The handle for writing to the child's standard input (stdin), if it
/// has been captured. You might find it helpful to do
///
/// ```compile_fail,E0425
/// ```ignore (incomplete)
/// let stdin = child.stdin.take().unwrap();
/// ```
///
Expand All @@ -183,7 +183,7 @@ pub struct Child {
/// The handle for reading from the child's standard output (stdout), if it
/// has been captured. You might find it helpful to do
///
/// ```compile_fail,E0425
/// ```ignore (incomplete)
/// let stdout = child.stdout.take().unwrap();
/// ```
///
Expand All @@ -195,7 +195,7 @@ pub struct Child {
/// The handle for reading from the child's standard error (stderr), if it
/// has been captured. You might find it helpful to do
///
/// ```compile_fail,E0425
/// ```ignore (incomplete)
/// let stderr = child.stderr.take().unwrap();
/// ```
///
Expand Down

0 comments on commit 535debf

Please sign in to comment.