From 57cf2ab31cb443721d0481ac5989dfdd17a1a251 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 20 Dec 2016 09:38:13 -0800 Subject: [PATCH] rustbuild: Deny and fix warnings Turned out this lint uncovered an actual bug! Closes #38484 --- src/bootstrap/bin/rustc.rs | 2 ++ src/bootstrap/bin/rustdoc.rs | 2 ++ src/bootstrap/flags.rs | 2 +- src/bootstrap/lib.rs | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs index 2fa4363e658a..9cab6c423f5f 100644 --- a/src/bootstrap/bin/rustc.rs +++ b/src/bootstrap/bin/rustc.rs @@ -25,6 +25,8 @@ //! switching compilers for the bootstrap and for build scripts will probably //! never get replaced. +#![deny(warnings)] + extern crate bootstrap; use std::env; diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs index 67358e540dad..a53bbe22eb94 100644 --- a/src/bootstrap/bin/rustdoc.rs +++ b/src/bootstrap/bin/rustdoc.rs @@ -12,6 +12,8 @@ //! //! See comments in `src/bootstrap/rustc.rs` for more information. +#![deny(warnings)] + extern crate bootstrap; use std::env; diff --git a/src/bootstrap/flags.rs b/src/bootstrap/flags.rs index e5ace62406a2..b2412fbb3c84 100644 --- a/src/bootstrap/flags.rs +++ b/src/bootstrap/flags.rs @@ -280,7 +280,7 @@ To learn more about a subcommand, run `./x.py -h` Flags { verbose: m.opt_count("v"), - stage: m.opt_str("stage").map(|j| j.parse().unwrap()), + stage: stage, keep_stage: m.opt_str("keep-stage").map(|j| j.parse().unwrap()), build: m.opt_str("build").unwrap_or_else(|| { env::var("BUILD").unwrap() diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index f6db6e786db8..b2f40ab9e9bd 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -64,6 +64,8 @@ //! More documentation can be found in each respective module below, and you can //! also check out the `src/bootstrap/README.md` file for more information. +#![deny(warnings)] + extern crate build_helper; extern crate cmake; extern crate filetime;