File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -191,15 +191,15 @@ declare_lint_pass!(FooFunctions => [FOO_FUNCTIONS]);
191191impl EarlyLintPass for FooFunctions {}
192192```
193193
194- Don't worry about the ` name ` method here. As long as it includes the name of the
195- lint pass it should be fine.
196-
197- The new lint automation runs ` update_lints ` , which automates some things, but it
198- doesn't automate everything. We will have to register our lint pass manually in
199- the ` register_plugins ` function in ` clippy_lints/src/lib.rs ` :
194+ Normally after declaring the lint, we have to run ` cargo dev update_lints ` ,
195+ which updates some files, so Clippy knows about the new lint. Since we used
196+ ` cargo dev new_lint ... ` to generate the lint declaration, this was done
197+ automatically. While ` update_lints ` automates most of the things, it doesn't
198+ automate everything. We will have to register our lint pass manually in the
199+ ` register_plugins ` function in ` clippy_lints/src/lib.rs ` :
200200
201201``` rust
202- reg . register_early_lint_pass (box foo_functions :: FooFunctions );
202+ store . register_early_pass (box foo_functions :: FooFunctions );
203203```
204204
205205This should fix the ` unknown clippy lint: clippy::foo_functions ` error that we
You can’t perform that action at this time.
0 commit comments