Skip to content

Commit 4721f44

Browse files
committed
Remove clippy dependency in lint_without_lint_pass
1 parent fe90b82 commit 4721f44

File tree

2 files changed

+21
-20
lines changed

2 files changed

+21
-20
lines changed

tests/ui/lint_without_lint_pass.rs

+15-15
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,25 @@
55
extern crate rustc;
66
use rustc::lint::{LintArray, LintPass};
77

8-
#[macro_use]
9-
extern crate clippy_lints;
10-
11-
declare_clippy_lint! {
12-
pub TEST_LINT,
13-
correctness,
14-
""
8+
declare_tool_lint! {
9+
pub clippy::TEST_LINT,
10+
Warn,
11+
"",
12+
report_in_external_macro: true
1513
}
1614

17-
declare_clippy_lint! {
18-
pub TEST_LINT_REGISTERED,
19-
correctness,
20-
""
15+
declare_tool_lint! {
16+
pub clippy::TEST_LINT_REGISTERED,
17+
Warn,
18+
"",
19+
report_in_external_macro: true
2120
}
2221

23-
declare_clippy_lint! {
24-
pub TEST_LINT_REGISTERED_ONLY_IMPL,
25-
correctness,
26-
""
22+
declare_tool_lint! {
23+
pub clippy::TEST_LINT_REGISTERED_ONLY_IMPL,
24+
Warn,
25+
"",
26+
report_in_external_macro: true
2727
}
2828

2929
pub struct Pass;

tests/ui/lint_without_lint_pass.stderr

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
error: the lint `TEST_LINT` is not added to any `LintPass`
2-
--> $DIR/lint_without_lint_pass.rs:11:1
2+
--> $DIR/lint_without_lint_pass.rs:8:1
33
|
4-
LL | / declare_clippy_lint! {
5-
LL | | pub TEST_LINT,
6-
LL | | correctness,
7-
LL | | ""
4+
LL | / declare_tool_lint! {
5+
LL | | pub clippy::TEST_LINT,
6+
LL | | Warn,
7+
LL | | "",
8+
LL | | report_in_external_macro: true
89
LL | | }
910
| |_^
1011
|

0 commit comments

Comments
 (0)