File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
clippy_lints/src/utils/internal_lints Expand file tree Collapse file tree 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 {
159159 let body = cx. tcx . hir ( ) . body_owned_by (
160160 impl_item_refs
161161 . 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 " )
164164 . id
165165 . owner_id
166166 . def_id ,
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ extern crate rustc_middle;
77#[ macro_use]
88extern crate rustc_session;
99extern crate rustc_lint;
10- use rustc_lint:: LintPass ;
10+ use rustc_lint:: { LintPass , LintVec } ;
1111
1212declare_tool_lint ! {
1313 pub clippy:: TEST_LINT ,
@@ -35,6 +35,9 @@ impl LintPass for Pass {
3535 fn name ( & self ) -> & ' static str {
3636 "TEST_LINT"
3737 }
38+ fn get_lints ( & self ) -> LintVec {
39+ vec ! [ TEST_LINT ]
40+ }
3841}
3942
4043declare_lint_pass ! ( Pass2 => [ TEST_LINT_REGISTERED ] ) ;
You can’t perform that action at this time.
0 commit comments