1
Fork 0

Run rustfmt

This commit is contained in:
Oliver Schneider 2017-04-12 11:06:32 +02:00
parent 81401ddc8c
commit 5842463562
15 changed files with 218 additions and 166 deletions

View file

@ -12,8 +12,13 @@ extern crate clippy_lints;
#[plugin_registrar]
pub fn plugin_registrar(reg: &mut Registry) {
if let Ok(lint_store) = reg.sess.lint_store.try_borrow() {
if lint_store.get_lint_groups().iter().any(|&(s, _, _)| s == "clippy") {
reg.sess.struct_warn("running cargo clippy on a crate that also imports the clippy plugin").emit();
if lint_store
.get_lint_groups()
.iter()
.any(|&(s, _, _)| s == "clippy") {
reg.sess
.struct_warn("running cargo clippy on a crate that also imports the clippy plugin")
.emit();
return;
}
}