about summary refs log tree commit diff
path: root/tests/codegen/patchable-function-entry
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2024-12-02 18:42:42 +0000
committerGitHub <noreply@github.com>2024-12-02 18:42:42 +0000
commitdf46e4cf13fa050d27c461888402fbcd3677613d (patch)
tree8dd9b6e2a800e0b79569d9855de0811e2d2af7ba /tests/codegen/patchable-function-entry
parent74dd50c65387a3e71e9b83c2915712022e75ca12 (diff)
parent132954736780231605ac80ae6657e01a7d1280dd (diff)
downloadrust-df46e4cf13fa050d27c461888402fbcd3677613d.tar.gz
rust-df46e4cf13fa050d27c461888402fbcd3677613d.zip
add targeted help messages to `zombie_processes` diagnostic (#13760)
Fixes #13748

Diagnostic for that issue with this change:
```
warning: spawned process is not `wait()`ed on in all code paths
   --> x.rs:167:19
    |
167 |     let mut cmd = cmd.unwrap();
    |                   ^^^^^^^^^^^^
    |
note: no `wait()` call exists on the code path to this early return
   --> x.rs:178:47
    |
178 |             std::io::ErrorKind::BrokenPipe => return Some(0),
    |                                               ^^^^^^^^^^^^^^
note: `wait()` call exists, but it is unreachable due to the early return
   --> x.rs:185:10
    |
185 |     Some(cmd.wait().unwrap().code().unwrap()) // <-- wait()!
    |          ^^^
    = help: consider calling `.wait()` in all code paths
    = note: not doing so might leave behind zombie processes
    = note: see https://doc.rust-lang.org/stable/std/process/struct.Child.html#warning
```
Instead of saying "wait() is **never** called", it now says it's not
called by all code paths and points out the early return in particular.

changelog: none
Diffstat (limited to 'tests/codegen/patchable-function-entry')
0 files changed, 0 insertions, 0 deletions