diff options
| author | xFrednet <xFrednet@gmail.com> | 2021-01-25 19:46:19 +0100 |
|---|---|---|
| committer | xFrednet <xFrednet@gmail.com> | 2021-01-25 19:46:19 +0100 |
| commit | 69f2b8f0f81e690cef81f7e4fcbdb5690e20c71e (patch) | |
| tree | 9c4267f220ad37398666b6952241f74728777a6a | |
| parent | c56b32899fd5144b4dcc4ca2185ed3721ac56c4b (diff) | |
| download | rust-69f2b8f0f81e690cef81f7e4fcbdb5690e20c71e.tar.gz rust-69f2b8f0f81e690cef81f7e4fcbdb5690e20c71e.zip | |
Updated some NITs in the documentation from #6630
| -rw-r--r-- | doc/adding_lints.md | 10 | ||||
| -rw-r--r-- | doc/basics.md | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/doc/adding_lints.md b/doc/adding_lints.md index fd2a7d171d0..8fd1dea9aee 100644 --- a/doc/adding_lints.md +++ b/doc/adding_lints.md @@ -581,15 +581,15 @@ in the following steps: 3. Passing the configuration value to the lint impl struct: First find the struct construction in the [clippy_lints lib file](/clippy_lints/src/lib.rs). - Make sure that `clippy dev update_lints` added it beforehand. The configuration value is now - cloned or copied into a local value that is then passed to the impl struct like this: + The configuration value is now cloned or copied into a local value that is then passed to the + impl struct like this: ```rust // Default generated registration: - store.register_late_pass(|| box module::StructName); + store.register_*_pass(|| box module::StructName); // New registration with configuration value let configuration_ident = conf.configuration_ident.clone(); - store.register_late_pass(move || box module::StructName::new(configuration_ident)); + store.register_*_pass(move || box module::StructName::new(configuration_ident)); ``` Congratulations the work is almost done. The configuration value can now be accessed @@ -599,7 +599,7 @@ in the following steps: 1. The default configured value can be tested like any normal lint in [`tests/ui`](/tests/ui). 2. The configuration itself will be tested separately in [`tests/ui-toml`](/tests/ui-toml). Simply add a new subfolder with a fitting name. This folder contains a `clippy.toml` file - with the configuration value and a rust file that should be linted by clippy. The test can + with the configuration value and a rust file that should be linted by Clippy. The test can otherwise be written as usual. ## Cheatsheet diff --git a/doc/basics.md b/doc/basics.md index 57f83bdf32b..a9416f3b20b 100644 --- a/doc/basics.md +++ b/doc/basics.md @@ -109,7 +109,7 @@ See <https://rustc-dev-guide.rust-lang.org/contributing.html#opening-a-pr>. | HIR | High-Level Intermediate Representation | | TCX | Type context | -This is a concise list of abbreviations that can come up during clippy development. An extensive +This is a concise list of abbreviations that can come up during Clippy development. An extensive general list can be found in the [rustc-dev-guide glossary][glossary]. Always feel free to ask if an abbreviation or meaning is unclear to you. |
