From 2cf7c29675583b8362a9116397b297f6fc872678 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 4 Nov 2019 10:08:58 +0100 Subject: [PATCH] avoid using nightly features --- src/tools/build-manifest/src/main.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs index 3822cccd63b..373c72f9843 100644 --- a/src/tools/build-manifest/src/main.rs +++ b/src/tools/build-manifest/src/main.rs @@ -4,7 +4,6 @@ //! via `x.py dist hash-and-sign`; the cmdline arguments are set up //! by rustbuild (in `src/bootstrap/dist.rs`). -#![feature(try_blocks)] #![deny(warnings)] use toml; @@ -381,10 +380,9 @@ fn build(&mut self) { /// If a tool does not pass its tests, don't ship it. /// Right now, we do this only for Miri. fn check_toolstate(&mut self) { - let toolstates: Option> = try { - let toolstates = File::open(self.input.join("toolstates-linux.json")).ok()?; - serde_json::from_reader(&toolstates).ok()? - }; + let toolstates: Option> = + File::open(self.input.join("toolstates-linux.json")).ok() + .and_then(|f| serde_json::from_reader(&f).ok()); let toolstates = toolstates.unwrap_or_else(|| { println!("WARNING: `toolstates-linux.json` missing; assuming all tools failed"); HashMap::default() // Use empty map if anything went wrong. -- 2.44.0