@@ -4,7 +4,7 @@ Before working on the logic of a new lint, there is an important decision
44that every Clippy developers must make: to use
55[ ` EarlyLintPass ` ] [ early_lint_pass ] or [ ` LateLintPass ` ] [ late_lint_pass ] .
66
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
88` EarlyLintPass ` doesn't. If you don't need access to type information, use the
99` EarlyLintPass ` .
1010
@@ -20,14 +20,14 @@ you'll see that every method defined for this trait utilizes a
2020
2121Voilà. ` EarlyLintPass ` works only on the Abstract Syntax Tree (AST) level.
2222And 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.
2525
2626While 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
2828if you know for sure a lint does not need type information.
2929
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
3131that use ` EarlyLintPass ` :
3232
3333``` sh
0 commit comments