diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-01-28 22:25:44 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-28 22:25:44 +0100 |
| commit | 42dae3adad69a4e1f0a497555154b27a987802f5 (patch) | |
| tree | f5adba36b4f88f8f6455f0114c09fd2c8a97698a /src/rustllvm/PassWrapper.cpp | |
| parent | 76dbfdd595894dd113f22188477ff3ad46bb0a13 (diff) | |
| parent | 2ec0e85305e69d7f6e1bc0c704a6566ad38232a4 (diff) | |
| download | rust-42dae3adad69a4e1f0a497555154b27a987802f5.tar.gz rust-42dae3adad69a4e1f0a497555154b27a987802f5.zip | |
Rollup merge of #57833 - jethrogb:jb/thread-spawn-unwrap, r=alexcrichton
Print a slightly clearer message when failing to launch a thread
As discussed in #46345, the `io::Error` you get when a thread fails to launch is of type `io::ErrorKind::WouldBlock`. This is super uninformative when an arbitrary `thread::spawn` fails somewhere in your code:
```
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 11,
kind: WouldBlock, message: "operation would block" }', src/libcore/result.rs:997:5
```
This PR improves the situation a little bit by using `expect` instead of `unwrap`. I don't consider this a complete fix for #46345 though.
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
