diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2024-12-02 18:42:42 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-02 18:42:42 +0000 |
| commit | df46e4cf13fa050d27c461888402fbcd3677613d (patch) | |
| tree | 8dd9b6e2a800e0b79569d9855de0811e2d2af7ba /tests/codegen/patchable-function-entry/patchable-function-entry-one-flag.rs | |
| parent | 74dd50c65387a3e71e9b83c2915712022e75ca12 (diff) | |
| parent | 132954736780231605ac80ae6657e01a7d1280dd (diff) | |
| download | rust-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/patchable-function-entry-one-flag.rs')
0 files changed, 0 insertions, 0 deletions
