Run rustfmt on src

This commit is contained in:
flip1995 2018-11-27 21:12:13 +01:00
parent 2953ae0702
commit d71c871568
No known key found for this signature in database
GPG Key ID: E8E897A5870E41C2
3 changed files with 111 additions and 114 deletions

View File

@ -7,11 +7,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// error-pattern:yummy
#![feature(box_syntax)]
#![feature(rustc_private)]
#![feature(try_from)]
#![allow(clippy::missing_docs_in_private_items)]
@ -33,7 +31,8 @@ fn show_version() {
pub fn main() {
rustc_driver::init_rustc_env_logger();
exit(rustc_driver::run(move || {
exit(
rustc_driver::run(move || {
use std::env;
if std::env::args().any(|a| a == "--version" || a == "-V") {
@ -93,15 +92,13 @@ pub fn main() {
if clippy_enabled {
args.extend_from_slice(&["--cfg".to_owned(), r#"feature="cargo-clippy""#.to_owned()]);
if let Ok(extra_args) = env::var("CLIPPY_ARGS") {
args.extend(
extra_args
.split("__CLIPPY_HACKERY__")
.filter_map(|s| if s.is_empty() {
args.extend(extra_args.split("__CLIPPY_HACKERY__").filter_map(|s| {
if s.is_empty() {
None
} else {
Some(s.to_string())
})
);
}
}));
}
}
@ -154,5 +151,8 @@ pub fn main() {
let args = args;
rustc_driver::run_compiler(&args, Box::new(controller), None, None)
}).try_into().expect("exit code too large"))
})
.try_into()
.expect("exit code too large"),
)
}

View File

@ -7,11 +7,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// error-pattern:cargo-clippy
#![feature(plugin_registrar)]
#![feature(rustc_private)]
#![allow(clippy::missing_docs_in_private_items)]
#![warn(rust_2018_idioms)]

View File

@ -7,11 +7,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// error-pattern:yummy
#![feature(box_syntax)]
#![feature(rustc_private)]
#![allow(clippy::missing_docs_in_private_items)]
use rustc_tools_util::*;
@ -106,7 +104,8 @@ where
.into_os_string()
},
)
}).map(|p| ("CARGO_TARGET_DIR", p));
})
.map(|p| ("CARGO_TARGET_DIR", p));
let exit_status = std::process::Command::new("cargo")
.args(&args)