1
Fork 0

Handfix dogfood issues with the rustfmt changes

This commit is contained in:
Oliver Schneider 2017-08-09 09:59:38 +02:00
parent b25b6b3355
commit 0e4c49b145
No known key found for this signature in database
GPG key ID: A69F8D225B3AD7D9
4 changed files with 20 additions and 43 deletions

View file

@ -12,14 +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();
return;
for (lint, _, _) in lint_store.get_lint_groups() {
if lint == "clippy" {
reg.sess
.struct_warn("running cargo clippy on a crate that also imports the clippy plugin")
.emit();
return;
}
}
}