Remove three uses of LitKind::synthesize_token_lit
.
This commit is contained in:
parent
d887615b4c
commit
568e647047
3 changed files with 8 additions and 6 deletions
|
@ -2,6 +2,8 @@ use crate::pp::Breaks::Inconsistent;
|
|||
use crate::pprust::state::{AnnNode, IterDelimited, PrintState, State, INDENT_UNIT};
|
||||
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_ast::token;
|
||||
use rustc_ast::util::literal::escape_byte_str_symbol;
|
||||
use rustc_ast::util::parser::{self, AssocOp, Fixity};
|
||||
use rustc_ast::{self as ast, BlockCheckMode};
|
||||
|
||||
|
@ -323,8 +325,7 @@ impl<'a> State<'a> {
|
|||
self.print_token_literal(*token_lit, expr.span);
|
||||
}
|
||||
ast::ExprKind::IncludedBytes(bytes) => {
|
||||
let lit = ast::LitKind::ByteStr(bytes.clone(), ast::StrStyle::Cooked)
|
||||
.synthesize_token_lit();
|
||||
let lit = token::Lit::new(token::ByteStr, escape_byte_str_symbol(bytes), None);
|
||||
self.print_token_literal(lit, expr.span)
|
||||
}
|
||||
ast::ExprKind::Cast(expr, ty) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue