diff options
| author | Fraser Hutchison <fraser.hutchison@maidsafe.net> | 2018-06-21 05:20:14 +0100 |
|---|---|---|
| committer | Fraser Hutchison <fraser.hutchison@maidsafe.net> | 2018-06-21 05:20:14 +0100 |
| commit | 5be00bcd1835145ff71ec3539c2bf849da0e37ed (patch) | |
| tree | e38f784eae8f72eafdb89d1f0abc84fe34dbfceb /src | |
| parent | cd90441a73e52166bad2bba80040b1d2ed59efee (diff) | |
| download | rust-5be00bcd1835145ff71ec3539c2bf849da0e37ed.tar.gz rust-5be00bcd1835145ff71ec3539c2bf849da0e37ed.zip | |
Ensure a non-zero value is returned by clippy if compilation fails
Diffstat (limited to 'src')
| -rw-r--r-- | src/driver.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/driver.rs b/src/driver.rs index 830c8985660..419f61f860b 100644 --- a/src/driver.rs +++ b/src/driver.rs @@ -13,7 +13,7 @@ extern crate rustc_plugin; extern crate syntax; use rustc_driver::{driver::CompileController, Compilation}; -use std::process::Command; +use std::process::{exit, Command}; #[allow(print_stdout)] fn show_version() { @@ -133,5 +133,10 @@ pub fn main() { } controller.compilation_done.stop = Compilation::Stop; - rustc_driver::run_compiler(&args, Box::new(controller), None, None); + if rustc_driver::run_compiler(&args, Box::new(controller), None, None) + .0 + .is_err() + { + exit(101); + } } |
