diff options
| author | Lukas Wirth <lukastw97@gmail.com> | 2024-08-29 08:41:43 +0200 |
|---|---|---|
| committer | Lukas Wirth <lukastw97@gmail.com> | 2024-08-29 08:45:35 +0200 |
| commit | 03d67458eef99fc23ef8b0bf701bc75e6f672d1c (patch) | |
| tree | 4a082533b3361e51249ecdbdf9956d21a4c48646 /src/tools/rust-analyzer/crates/tt | |
| parent | 14ec1202e5ac51cd9c91ca5bb1f68a6cf688e3aa (diff) | |
fix: Fix TokenStream::to_string implementation dropping quotation marks
Diffstat (limited to 'src/tools/rust-analyzer/crates/tt')
| -rw-r--r-- | src/tools/rust-analyzer/crates/tt/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/rust-analyzer/crates/tt/src/lib.rs b/src/tools/rust-analyzer/crates/tt/src/lib.rs index 7b72f9ff108..8d915d0a51e 100644 --- a/src/tools/rust-analyzer/crates/tt/src/lib.rs +++ b/src/tools/rust-analyzer/crates/tt/src/lib.rs @@ -603,7 +603,7 @@ pub fn pretty<S>(tkns: &[TokenTree<S>]) -> String { TokenTree::Leaf(Leaf::Ident(ident)) => { format!("{}{}", ident.is_raw.as_str(), ident.sym) } - TokenTree::Leaf(Leaf::Literal(literal)) => literal.symbol.as_str().to_owned(), + TokenTree::Leaf(Leaf::Literal(literal)) => format!("{literal}"), TokenTree::Leaf(Leaf::Punct(punct)) => format!("{}", punct.char), TokenTree::Subtree(subtree) => { let content = pretty(&subtree.token_trees); |
