]> git.lizzy.rs Git - rust.git/commit
Remove `Lit::from_included_bytes`.
authorNicholas Nethercote <n.nethercote@gmail.com>
Wed, 23 Nov 2022 06:00:37 +0000 (17:00 +1100)
committerNicholas Nethercote <n.nethercote@gmail.com>
Mon, 28 Nov 2022 04:17:45 +0000 (15:17 +1100)
commit8cfc8153da71c599ba6e118279d366b74638057e
tree85eb61282cf859796b07ec94cc996462145d220c
parent8c6bf2bee7914fd94f8ae5ec96234e8a2ce51958
Remove `Lit::from_included_bytes`.

`Lit::from_included_bytes` calls `Lit::from_lit_kind`, but the two call
sites only need the resulting `token::Lit`, not the full `ast::Lit`.

This commit changes those call sites to use `LitKind::to_token_lit`,
which means `from_included_bytes` can be removed.
compiler/rustc_ast/src/util/literal.rs
compiler/rustc_ast_pretty/src/pprust/state/expr.rs
compiler/rustc_expand/src/proc_macro_server.rs