File tree 2 files changed +6
-3
lines changed
clippy_lints/src/utils/internal_lints
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -159,8 +159,8 @@ impl<'tcx> LateLintPass<'tcx> for LintWithoutLintPass {
159
159
let body = cx. tcx . hir ( ) . body_owned_by (
160
160
impl_item_refs
161
161
. iter ( )
162
- . find ( |iiref| iiref. ident . as_str ( ) == "get_lints " )
163
- . expect ( "LintPass needs to implement get_lints " )
162
+ . find ( |iiref| iiref. ident . as_str ( ) == "lint_vec " )
163
+ . expect ( "LintPass needs to implement lint_vec " )
164
164
. id
165
165
. owner_id
166
166
. def_id ,
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ extern crate rustc_middle;
7
7
#[ macro_use]
8
8
extern crate rustc_session;
9
9
extern crate rustc_lint;
10
- use rustc_lint:: LintPass ;
10
+ use rustc_lint:: { LintPass , LintVec } ;
11
11
12
12
declare_tool_lint ! {
13
13
pub clippy:: TEST_LINT ,
@@ -35,6 +35,9 @@ impl LintPass for Pass {
35
35
fn name ( & self ) -> & ' static str {
36
36
"TEST_LINT"
37
37
}
38
+ fn get_lints ( & self ) -> LintVec {
39
+ vec ! [ TEST_LINT ]
40
+ }
38
41
}
39
42
40
43
declare_lint_pass ! ( Pass2 => [ TEST_LINT_REGISTERED ] ) ;
You can’t perform that action at this time.
0 commit comments