Skip to content

Commit d4eb496

Browse files
committed
Improve documentation
1 parent 515847d commit d4eb496

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

CONTRIBUTING.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ and resolved paths.
5454
[`T-AST`] issues will generally need you to match against a predefined syntax structure.
5555
To figure out how this syntax structure is encoded in the AST, it is recommended to run
5656
`rustc -Z ast-json` on an example of the structure and compare with the [nodes in the AST docs].
57-
Usually the lint will end up to be a nested series of matches and ifs, [like so].
57+
Usually the lint will end up to be a nested series of matches and ifs, [like so][deep-nesting].
58+
But we can make it nest-less by using [if_chain] macro, [like this][nest-less].
5859

5960
[`E-medium`] issues are generally pretty easy too, though it's recommended you work on an E-easy issue first.
6061
They are mostly classified as [`E-medium`], since they might be somewhat involved code wise,
@@ -71,7 +72,9 @@ an AST expression). `match_def_path()` in Clippy's `utils` module can also be us
7172
[`E-medium`]: https://github.com/rust-lang/rust-clippy/labels/E-medium
7273
[`ty`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc/ty
7374
[nodes in the AST docs]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_ast/ast/
74-
[like so]: https://github.com/rust-lang/rust-clippy/blob/de5ccdfab68a5e37689f3c950ed1532ba9d652a0/src/misc.rs#L34
75+
[deep-nesting]: https://github.com/rust-lang/rust-clippy/blob/557f6848bd5b7183f55c1e1522a326e9e1df6030/clippy_lints/src/mem_forget.rs#L29-L43
76+
[if_chain]: https://docs.rs/if_chain/*/if_chain
77+
[nest-less]: https://github.com/rust-lang/rust-clippy/blob/557f6848bd5b7183f55c1e1522a326e9e1df6030/clippy_lints/src/bit_mask.rs#L124-L150
7578

7679
## Writing code
7780

0 commit comments

Comments
 (0)