From 11758d518a088a5c8b6727e9362af2d09a177cc0 Mon Sep 17 00:00:00 2001 From: kjeremy Date: Thu, 3 Sep 2020 17:30:44 -0400 Subject: Up proc-macro2 to 1.20 This changes the way Display is implemented --- xtask/src/codegen/gen_syntax.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xtask') diff --git a/xtask/src/codegen/gen_syntax.rs b/xtask/src/codegen/gen_syntax.rs index 200e8aa50..733493fef 100644 --- a/xtask/src/codegen/gen_syntax.rs +++ b/xtask/src/codegen/gen_syntax.rs @@ -247,14 +247,14 @@ fn generate_nodes(kinds: KindsSrc<'_>, grammar: &AstSrc) -> Result { #(#display_impls)* }; - let ast = ast.to_string().replace("T ! [ ", "T![").replace(" ] )", "])"); + let ast = ast.to_string().replace("T ! [", "T!["); let mut res = String::with_capacity(ast.len() * 2); let mut docs = grammar.nodes.iter().map(|it| &it.doc).chain(grammar.enums.iter().map(|it| &it.doc)); - for chunk in ast.split("# [ pretty_doc_comment_placeholder_workaround ]") { + for chunk in ast.split("# [pretty_doc_comment_placeholder_workaround] ") { res.push_str(chunk); if let Some(doc) = docs.next() { write_doc_comment(&doc, &mut res); -- cgit v1.2.3