mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Up proc-macro2 to 1.20
This changes the way Display is implemented
This commit is contained in:
parent
74e7422b69
commit
11758d518a
3 changed files with 5 additions and 5 deletions
|
@ -247,14 +247,14 @@ fn generate_nodes(kinds: KindsSrc<'_>, grammar: &AstSrc) -> Result<String> {
|
|||
#(#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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue