Run rustfmt on src
This commit is contained in:
parent
2953ae0702
commit
d71c871568
|
@ -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"),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -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)]
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue