Closed
Description
use std::io;
use std::run;
fn main() {
io::io_error::cond.trap(|_| {}).inside({
|| {
let opts = run::ProcessOptions::new();
let _ = run::Process::new("", [], opts); // io_error
}
})
}
Result:
task '<main>' failed at 'called `Option::unwrap()` on a `None` value', C:\home\stone\rust-vanilla\src\libstd\option.rs:135
Similarly std::run::{process_status, process_output}
fails if it fails to make new process.
Previously #10654 suggested a potential fix using Result
but the patch would sound after #10449 lands.
Metadata
Metadata
Assignees
Labels
No labels