rustc: Correctly pretty-print macro delimiters
This commit updates the `Mac_` AST structure to keep track of the delimiters that it originally had for its invocation. This allows us to faithfully pretty-print macro invocations not using parentheses (e.g. `vec![...]`). This in turn helps procedural macros due to #43081. Closes #50840
This commit is contained in:
@@ -520,6 +520,7 @@ pub fn noop_fold_mac<T: Folder>(Spanned {node, span}: Mac, fld: &mut T) -> Mac {
|
||||
node: Mac_ {
|
||||
tts: fld.fold_tts(node.stream()).into(),
|
||||
path: fld.fold_path(node.path),
|
||||
delim: node.delim,
|
||||
},
|
||||
span: fld.new_span(span)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user