Skip to content

Commit 9b5535a

Browse files
committed
Fix lints in tests
1 parent beb0c74 commit 9b5535a

File tree

7 files changed

+28
-0
lines changed

7 files changed

+28
-0
lines changed

src/test/compile-fail-fulldeps/auxiliary/lint_group_plugin_test.rs

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ declare_lint!(PLEASE_LINT, Warn, "Warn about items named 'pleaselintme'");
1919
struct Pass;
2020

2121
impl LintPass for Pass {
22+
fn name(&self) -> &'static str {
23+
"Pass"
24+
}
25+
2226
fn get_lints(&self) -> LintArray {
2327
lint_array!(TEST_LINT, PLEASE_LINT)
2428
}

src/test/run-pass-fulldeps/auxiliary/issue-40001-plugin.rs

+4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ declare_lint!(MISSING_WHITELISTED_ATTR, Deny,
3232
struct MissingWhitelistedAttrPass;
3333

3434
impl LintPass for MissingWhitelistedAttrPass {
35+
fn name(&self) -> &'static str {
36+
"MissingWhitelistedAttrPass"
37+
}
38+
3539
fn get_lints(&self) -> LintArray {
3640
lint_array!(MISSING_WHITELISTED_ATTR)
3741
}

src/test/run-pass-fulldeps/auxiliary/lint_for_crate.rs

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ macro_rules! fake_lint_pass {
1717
struct $struct;
1818

1919
impl LintPass for $struct {
20+
fn name(&self) -> &'static str {
21+
stringify!($struct)
22+
}
23+
2024
fn get_lints(&self) -> LintArray {
2125
$lints
2226
}

src/test/ui-fulldeps/auxiliary/lint_for_crate.rs

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ declare_lint!(CRATE_NOT_OKAY, Warn, "crate not marked with #![crate_okay]");
1717
struct Pass;
1818

1919
impl LintPass for Pass {
20+
fn name(&self) -> &'static str {
21+
"Pass"
22+
}
23+
2024
fn get_lints(&self) -> LintArray {
2125
lint_array!(CRATE_NOT_OKAY)
2226
}

src/test/ui-fulldeps/auxiliary/lint_group_plugin_test.rs

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ declare_lint!(PLEASE_LINT, Warn, "Warn about items named 'pleaselintme'");
1919
struct Pass;
2020

2121
impl LintPass for Pass {
22+
fn name(&self) -> &'static str {
23+
"Pass"
24+
}
25+
2226
fn get_lints(&self) -> LintArray {
2327
lint_array!(TEST_LINT, PLEASE_LINT)
2428
}

src/test/ui-fulldeps/auxiliary/lint_plugin_test.rs

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ declare_lint!(TEST_LINT, Warn, "Warn about items named 'lintme'");
1919
struct Pass;
2020

2121
impl LintPass for Pass {
22+
fn name(&self) -> &'static str {
23+
"Pass"
24+
}
25+
2226
fn get_lints(&self) -> LintArray {
2327
lint_array!(TEST_LINT)
2428
}

src/test/ui-fulldeps/auxiliary/lint_tool_test.rs

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ declare_tool_lint!(pub clippy::TEST_GROUP, Warn, "Warn about other stuff");
1818
struct Pass;
1919

2020
impl LintPass for Pass {
21+
fn name(&self) -> &'static str {
22+
"Pass"
23+
}
24+
2125
fn get_lints(&self) -> LintArray {
2226
lint_array!(TEST_LINT, TEST_GROUP)
2327
}

0 commit comments

Comments
 (0)