Rewrite registered lint collection

This commit is contained in:
flip1995 2018-10-29 20:37:47 +01:00
parent 267d5d3433
commit a7fc6799df
No known key found for this signature in database
GPG key ID: E8E897A5870E41C2
3 changed files with 26 additions and 16 deletions

View file

@ -4,16 +4,29 @@
#[macro_use]
extern crate rustc;
use rustc::lint;
#[macro_use]
extern crate clippy_lints;
declare_clippy_lint!
{
declare_clippy_lint! {
pub TEST_LINT,
correctness,
""
}
declare_clippy_lint! {
pub TEST_LINT_REGISTERED,
correctness,
""
}
pub struct Pass;
impl lint::LintPass for Pass {
fn get_lints(&self) -> lint::LintArray {
lint_array!(TEST_LINT_REGISTERED)
}
}
fn main() {
}