Skip to content

Commit 2cf7c29

Browse files
committed
avoid using nightly features
1 parent a675fd6 commit 2cf7c29

File tree

1 file changed

+3
-5
lines changed
  • src/tools/build-manifest/src

1 file changed

+3
-5
lines changed

src/tools/build-manifest/src/main.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
//! via `x.py dist hash-and-sign`; the cmdline arguments are set up
55
//! by rustbuild (in `src/bootstrap/dist.rs`).
66
7-
#![feature(try_blocks)]
87
#![deny(warnings)]
98

109
use toml;
@@ -381,10 +380,9 @@ impl Builder {
381380
/// If a tool does not pass its tests, don't ship it.
382381
/// Right now, we do this only for Miri.
383382
fn check_toolstate(&mut self) {
384-
let toolstates: Option<HashMap<String, String>> = try {
385-
let toolstates = File::open(self.input.join("toolstates-linux.json")).ok()?;
386-
serde_json::from_reader(&toolstates).ok()?
387-
};
383+
let toolstates: Option<HashMap<String, String>> =
384+
File::open(self.input.join("toolstates-linux.json")).ok()
385+
.and_then(|f| serde_json::from_reader(&f).ok());
388386
let toolstates = toolstates.unwrap_or_else(|| {
389387
println!("WARNING: `toolstates-linux.json` missing; assuming all tools failed");
390388
HashMap::default() // Use empty map if anything went wrong.

0 commit comments

Comments
 (0)