diff options
| author | bors <bors@rust-lang.org> | 2023-01-20 04:52:28 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-01-20 04:52:28 +0000 |
| commit | 56ee85274e5a3a4dda92f3bf73d1664c74ff9c15 (patch) | |
| tree | b8395fc6f6151aca9ccd2c401f763585999302a9 /compiler/rustc_interface/src | |
| parent | 51d50ea96ecc9c681a0054e5eb8e5e1d4ab38906 (diff) | |
| parent | 65d1e8d9b556095dc50dc357e1ec4899afc3e975 (diff) | |
| download | rust-56ee85274e5a3a4dda92f3bf73d1664c74ff9c15.tar.gz rust-56ee85274e5a3a4dda92f3bf73d1664c74ff9c15.zip | |
Auto merge of #106090 - WaffleLapkin:dereffffffffff, r=Nilstrieb
Remove some `ref` patterns from the compiler Previous PR: https://github.com/rust-lang/rust/pull/105368 r? `@Nilstrieb`
Diffstat (limited to 'compiler/rustc_interface/src')
| -rw-r--r-- | compiler/rustc_interface/src/lib.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_interface/src/passes.rs | 6 |
2 files changed, 3 insertions, 4 deletions
diff --git a/compiler/rustc_interface/src/lib.rs b/compiler/rustc_interface/src/lib.rs index 542b638bbd7..82bc4770b6b 100644 --- a/compiler/rustc_interface/src/lib.rs +++ b/compiler/rustc_interface/src/lib.rs @@ -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)] diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index 2fa846b7e4b..379a76528f3 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -558,7 +558,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 @@ -645,9 +645,7 @@ fn write_out_deps( writeln!(file)?; } } - - Ok(()) - })(); + }; match result { Ok(_) => { |
