fix-2927: Update formatting
This commit is contained in:
@@ -179,6 +179,14 @@ mod reexport {
|
|||||||
crate use syntax::ast::{Name, NodeId};
|
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 {
|
pub fn read_conf(reg: &rustc_plugin::Registry<'_>) -> Conf {
|
||||||
match utils::conf::file_from_args(reg.args()) {
|
match utils::conf::file_from_args(reg.args()) {
|
||||||
Ok(file_name) => {
|
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]
|
#[rustfmt::skip]
|
||||||
pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
|
pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
|
||||||
let mut store = reg.sess.lint_store.borrow_mut();
|
let mut store = reg.sess.lint_store.borrow_mut();
|
||||||
|
|||||||
Reference in New Issue
Block a user