fix-2927: Update formatting

This commit is contained in:
Michael Wright 2018-08-16 07:13:52 +02:00
parent bbd67c9b78
commit 1c681b6ab6

View File

@ -179,6 +179,14 @@ mod reexport {
crate use syntax::ast::{Name, NodeId};
}
pub fn register_pre_expansion_lints(session: &rustc::session::Session, store: &mut rustc::lint::LintStore, conf: &Conf) {
store.register_pre_expansion_pass(Some(session), box write::Pass);
store.register_pre_expansion_pass(Some(session), box redundant_field_names::RedundantFieldNames);
store.register_pre_expansion_pass(Some(session), box non_expressive_names::NonExpressiveNames {
single_char_binding_names_threshold: conf.single_char_binding_names_threshold,
});
}
pub fn read_conf(reg: &rustc_plugin::Registry<'_>) -> Conf {
match utils::conf::file_from_args(reg.args()) {
Ok(file_name) => {
@ -225,14 +233,6 @@ pub fn read_conf(reg: &rustc_plugin::Registry<'_>) -> Conf {
}
}
pub fn register_pre_expansion_lints(session: &rustc::session::Session, store: &mut rustc::lint::LintStore, conf: &Conf) {
store.register_pre_expansion_pass(Some(session), box write::Pass);
store.register_pre_expansion_pass(Some(session), box redundant_field_names::RedundantFieldNames);
store.register_pre_expansion_pass(Some(session), box non_expressive_names::NonExpressiveNames {
single_char_binding_names_threshold: conf.single_char_binding_names_threshold,
});
}
#[rustfmt::skip]
pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
let mut store = reg.sess.lint_store.borrow_mut();