]> git.lizzy.rs Git - rust.git/commit
Remove `LitKind::synthesize_token_lit`.
authorNicholas Nethercote <n.nethercote@gmail.com>
Mon, 5 Dec 2022 05:09:45 +0000 (16:09 +1100)
committerNicholas Nethercote <n.nethercote@gmail.com>
Mon, 5 Dec 2022 05:33:24 +0000 (16:33 +1100)
commit7e0c6dba0d83dbee96bbf7eac7b4cb563e297a5f
tree515d2bb20a4bba33579955c60fba264f7b03e9d6
parent568e647047e2a3b817a3f39d2ecb25989a4981ce
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.
compiler/rustc_ast/src/util/literal.rs
compiler/rustc_hir_pretty/src/lib.rs