From a137d00ce52e9db78bb803d1384fdf3a4c4e63ea Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 22 May 2018 08:01:21 -0700 Subject: 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 --- src/libsyntax/ext/placeholders.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/libsyntax/ext') diff --git a/src/libsyntax/ext/placeholders.rs b/src/libsyntax/ext/placeholders.rs index 9f60882ca29..5c1c661fffd 100644 --- a/src/libsyntax/ext/placeholders.rs +++ b/src/libsyntax/ext/placeholders.rs @@ -27,6 +27,7 @@ pub fn placeholder(kind: ExpansionKind, id: ast::NodeId) -> Expansion { dummy_spanned(ast::Mac_ { path: ast::Path { span: DUMMY_SP, segments: Vec::new() }, tts: TokenStream::empty().into(), + delim: ast::MacDelimiter::Brace, }) } -- cgit 1.4.1-3-g733a5