@@ -4,7 +4,7 @@ Before working on the logic of a new lint, there is an important decision
4
4
that every Clippy developers must make: to use
5
5
[ ` EarlyLintPass ` ] [ early_lint_pass ] or [ ` LateLintPass ` ] [ late_lint_pass ] .
6
6
7
- In short, the ` LateLintPass ` has access to type information while the
7
+ In short, the ` LateLintPass ` has access to type and symbol information while the
8
8
` EarlyLintPass ` doesn't. If you don't need access to type information, use the
9
9
` EarlyLintPass ` .
10
10
@@ -20,14 +20,14 @@ you'll see that every method defined for this trait utilizes a
20
20
21
21
Voilà. ` EarlyLintPass ` works only on the Abstract Syntax Tree (AST) level.
22
22
And AST is generated during the [ lexing and parsing] [ lexing_and_parsing ] phase
23
- of code compilation. Therefore, this is our trait choice for a new lint if
24
- the lint only deals with syntax-related issues.
23
+ of code compilation. Therefore, it doesn't know what a symbol means or information about types, and it should
24
+ be our trait choice for a new lint if the lint only deals with syntax-related issues.
25
25
26
26
While linting speed has not been a concern for Clippy,
27
- the ` EarlyLintPass ` is faster and it should be your choice
27
+ the ` EarlyLintPass ` is faster, and it should be your choice
28
28
if you know for sure a lint does not need type information.
29
29
30
- As a reminder, run the following command to generate boilerplates for lints
30
+ As a reminder, run the following command to generate boilerplate for lints
31
31
that use ` EarlyLintPass ` :
32
32
33
33
``` sh
0 commit comments