File tree 2 files changed +21
-20
lines changed
2 files changed +21
-20
lines changed Original file line number Diff line number Diff line change 5
5
extern crate rustc;
6
6
use rustc:: lint:: { LintArray , LintPass } ;
7
7
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
15
13
}
16
14
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
21
20
}
22
21
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
27
27
}
28
28
29
29
pub struct Pass ;
Original file line number Diff line number Diff line change 1
1
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
3
3
|
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
8
9
LL | | }
9
10
| |_^
10
11
|
You can’t perform that action at this time.
0 commit comments