mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
Auto merge of #4685 - HMPerson1:patch-1, r=Manishearth
Update adding_lints.md changelog: none
This commit is contained in:
commit
77092a54d7
@ -104,8 +104,6 @@ test file and compare that to the contents of a `.fixed` file.
|
|||||||
Use `tests/ui/update-all-references.sh` to automatically generate the
|
Use `tests/ui/update-all-references.sh` to automatically generate the
|
||||||
`.fixed` file after running the tests.
|
`.fixed` file after running the tests.
|
||||||
|
|
||||||
With tests in place, let's have a look at implementing our lint now.
|
|
||||||
|
|
||||||
### Edition 2018 tests
|
### Edition 2018 tests
|
||||||
|
|
||||||
Some features require the 2018 edition to work (e.g. `async_await`), but
|
Some features require the 2018 edition to work (e.g. `async_await`), but
|
||||||
@ -119,6 +117,8 @@ Manually testing against an example file can be useful if you have added some
|
|||||||
your local modifications, run `env CLIPPY_TESTS=true cargo run --bin
|
your local modifications, run `env CLIPPY_TESTS=true cargo run --bin
|
||||||
clippy-driver -- -L ./target/debug input.rs` from the working copy root.
|
clippy-driver -- -L ./target/debug input.rs` from the working copy root.
|
||||||
|
|
||||||
|
With tests in place, let's have a look at implementing our lint now.
|
||||||
|
|
||||||
### Lint declaration
|
### Lint declaration
|
||||||
|
|
||||||
We start by creating a new file in the `clippy_lints` crate. That's the crate
|
We start by creating a new file in the `clippy_lints` crate. That's the crate
|
||||||
|
Loading…
Reference in New Issue
Block a user