Don't call closures immediately, use try{}
blocks
This commit is contained in:
parent
bddbf38af2
commit
360e978437
10 changed files with 88 additions and 115 deletions
|
@ -3,6 +3,7 @@
|
|||
#![feature(internal_output_capture)]
|
||||
#![feature(thread_spawn_unchecked)]
|
||||
#![feature(once_cell)]
|
||||
#![feature(try_blocks)]
|
||||
#![recursion_limit = "256"]
|
||||
#![allow(rustc::potential_query_instability)]
|
||||
#![deny(rustc::untranslatable_diagnostic)]
|
||||
|
|
|
@ -559,7 +559,7 @@ fn write_out_deps(
|
|||
}
|
||||
let deps_filename = outputs.path(OutputType::DepInfo);
|
||||
|
||||
let result = (|| -> io::Result<()> {
|
||||
let result: io::Result<()> = try {
|
||||
// Build a list of files used to compile the output and
|
||||
// write Makefile-compatible dependency rules
|
||||
let mut files: Vec<String> = sess
|
||||
|
@ -646,9 +646,7 @@ fn write_out_deps(
|
|||
writeln!(file)?;
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
})();
|
||||
};
|
||||
|
||||
match result {
|
||||
Ok(_) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue