Auto merge of #3894 - markcatley:adding_lint_documentation_fixes, r=phansch

Add implementation for the EarlyLintPass trait into the Adding Lints …

…documentation.

To follow along with the adding lint documentation you need to implement this trait in order to register the lint pass.
This commit is contained in:
bors 2019-03-19 06:05:41 +00:00
commit dc825a36f2

View file

@ -115,7 +115,7 @@ where all the lint code is. We are going to call the file
`clippy_lints/src/foo_functions.rs` and import some initial things we need: `clippy_lints/src/foo_functions.rs` and import some initial things we need:
```rust ```rust
use rustc::lint::{LintArray, LintPass}; use rustc::lint::{LintArray, LintPass, EarlyLintPass};
use rustc::{declare_tool_lint, lint_array}; use rustc::{declare_tool_lint, lint_array};
``` ```
@ -161,6 +161,8 @@ impl LintPass for FooFunctionsPass {
"FooFunctions" "FooFunctions"
} }
} }
impl EarlyLintPass for FooFunctionsPass {}
``` ```
Don't worry about the `name` method here. As long as it includes the name of the Don't worry about the `name` method here. As long as it includes the name of the