Fix lints in tests

This commit is contained in:
John Kåre Alsaker
2019-01-19 06:26:34 +01:00
parent beb0c74950
commit 9b5535a6f3
7 changed files with 28 additions and 0 deletions
@@ -19,6 +19,10 @@
struct Pass;
impl LintPass for Pass {
fn name(&self) -> &'static str {
"Pass"
}
fn get_lints(&self) -> LintArray {
lint_array!(TEST_LINT, PLEASE_LINT)
}
@@ -32,6 +32,10 @@ pub fn plugin_registrar(reg: &mut Registry) {
struct MissingWhitelistedAttrPass;
impl LintPass for MissingWhitelistedAttrPass {
fn name(&self) -> &'static str {
"MissingWhitelistedAttrPass"
}
fn get_lints(&self) -> LintArray {
lint_array!(MISSING_WHITELISTED_ATTR)
}
@@ -17,6 +17,10 @@ macro_rules! fake_lint_pass {
struct $struct;
impl LintPass for $struct {
fn name(&self) -> &'static str {
stringify!($struct)
}
fn get_lints(&self) -> LintArray {
$lints
}
@@ -17,6 +17,10 @@
struct Pass;
impl LintPass for Pass {
fn name(&self) -> &'static str {
"Pass"
}
fn get_lints(&self) -> LintArray {
lint_array!(CRATE_NOT_OKAY)
}
@@ -19,6 +19,10 @@
struct Pass;
impl LintPass for Pass {
fn name(&self) -> &'static str {
"Pass"
}
fn get_lints(&self) -> LintArray {
lint_array!(TEST_LINT, PLEASE_LINT)
}
@@ -19,6 +19,10 @@
struct Pass;
impl LintPass for Pass {
fn name(&self) -> &'static str {
"Pass"
}
fn get_lints(&self) -> LintArray {
lint_array!(TEST_LINT)
}
@@ -18,6 +18,10 @@
struct Pass;
impl LintPass for Pass {
fn name(&self) -> &'static str {
"Pass"
}
fn get_lints(&self) -> LintArray {
lint_array!(TEST_LINT, TEST_GROUP)
}