diff --git a/mut_range_bound b/mut_range_bound deleted file mode 100755 index fdf917d5158..00000000000 Binary files a/mut_range_bound and /dev/null differ diff --git a/src/driver.rs b/src/driver.rs index ab5e90141a9..7bc5a109d5c 100644 --- a/src/driver.rs +++ b/src/driver.rs @@ -129,7 +129,7 @@ fn show_version() { pub fn main() { use std::env; - if env::var("CLIPPY_DOGFOOD").map(|_| true).unwrap_or(false) { + if env::var("CLIPPY_DOGFOOD").is_ok() { panic!("yummy"); } @@ -161,8 +161,11 @@ pub fn main() { rustc_driver::in_rustc_thread(|| { // Setting RUSTC_WRAPPER causes Cargo to pass 'rustc' as the first argument. - // We're invoking the compiler programatically, so we ignore this/ + // We're invoking the compiler programmatically, so we ignore this/ let mut orig_args: Vec<String> = env::args().collect(); + if orig_args.len() <= 1 { + std::process::exit(1); + } if orig_args[1] == "rustc" { // we still want to be able to invoke it normally though orig_args.remove(1); diff --git a/src/main.rs b/src/main.rs index 69f416e2092..11ae135bfa9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -51,7 +51,7 @@ fn show_version() { pub fn main() { use std::env; - if env::var("CLIPPY_DOGFOOD").map(|_| true).unwrap_or(false) { + if env::var("CLIPPY_DOGFOOD").is_ok() { panic!("yummy"); }