mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 07:04:18 +00:00
Suggest -Zunpretty=ast-tree instead of -Zast-json
-Zast-json is being removed shortly: https://github.com/rust-lang/rust/pull/85993. ast-tree does essentially the same thing, and still works today even before that PR lands.
This commit is contained in:
parent
5dad51736c
commit
677b38c918
1 changed files with 1 additions and 1 deletions
|
@ -67,7 +67,7 @@ and resolved paths.
|
|||
|
||||
[`T-AST`] issues will generally need you to match against a predefined syntax structure.
|
||||
To figure out how this syntax structure is encoded in the AST, it is recommended to run
|
||||
`rustc -Z ast-json` on an example of the structure and compare with the [nodes in the AST docs].
|
||||
`rustc -Z unpretty=ast-tree` on an example of the structure and compare with the [nodes in the AST docs].
|
||||
Usually the lint will end up to be a nested series of matches and ifs, [like so][deep-nesting].
|
||||
But we can make it nest-less by using [if_chain] macro, [like this][nest-less].
|
||||
|
||||
|
|
Loading…
Reference in a new issue