Handfix dogfood issues with the rustfmt changes
This commit is contained in:
parent
b25b6b3355
commit
0e4c49b145
4 changed files with 20 additions and 43 deletions
15
src/lib.rs
15
src/lib.rs
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue