From 677b38c9185feab059d8c3ef3dffe49e67c26aba Mon Sep 17 00:00:00 2001 From: Joshua Nelson Date: Thu, 5 May 2022 20:11:41 -0500 Subject: [PATCH] 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. --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fc663de8f792..022ba5d84148 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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].