Add tests for declare_lint_pass and impl_lint_pass
This commit is contained in:
parent
753c39672e
commit
ef29db773e
@ -3,7 +3,7 @@
|
||||
|
||||
#[macro_use]
|
||||
extern crate rustc;
|
||||
use rustc::lint;
|
||||
use rustc::lint::{LintArray, LintPass};
|
||||
|
||||
#[macro_use]
|
||||
extern crate clippy_lints;
|
||||
@ -21,8 +21,8 @@ declare_clippy_lint! {
|
||||
}
|
||||
|
||||
pub struct Pass;
|
||||
impl lint::LintPass for Pass {
|
||||
fn get_lints(&self) -> lint::LintArray {
|
||||
impl LintPass for Pass {
|
||||
fn get_lints(&self) -> LintArray {
|
||||
lint_array!(TEST_LINT_REGISTERED)
|
||||
}
|
||||
|
||||
@ -31,4 +31,9 @@ impl lint::LintPass for Pass {
|
||||
}
|
||||
}
|
||||
|
||||
declare_lint_pass!(Pass2 => [TEST_LINT_REGISTERED]);
|
||||
|
||||
pub struct Pass3;
|
||||
impl_lint_pass!(Pass3 => [TEST_LINT_REGISTERED]);
|
||||
|
||||
fn main() {}
|
||||
|
Loading…
Reference in New Issue
Block a user