Remove LitKind::synthesize_token_lit
.
It has a single call site in the HIR pretty printer, where the resulting token lit is immediately converted to a string. This commit replaces `LitKind::synthesize_token_lit` with a `Display` impl for `LitKind`, which can be used by the HIR pretty printer.
This commit is contained in:
parent
568e647047
commit
7e0c6dba0d
2 changed files with 45 additions and 40 deletions
|
@ -1256,7 +1256,7 @@ impl<'a> State<'a> {
|
|||
|
||||
fn print_literal(&mut self, lit: &hir::Lit) {
|
||||
self.maybe_print_comment(lit.span.lo());
|
||||
self.word(lit.node.synthesize_token_lit().to_string())
|
||||
self.word(lit.node.to_string())
|
||||
}
|
||||
|
||||
fn print_inline_asm(&mut self, asm: &hir::InlineAsm<'_>) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue