Rollup merge of #100018 - nnethercote:clean-up-LitKind, r=petrochenkov
Clean up `LitKind` r? ``@petrochenkov``
This commit is contained in:
commit
d5dca26a94
19 changed files with 73 additions and 66 deletions
|
@ -1750,8 +1750,8 @@ impl<'a> Parser<'a> {
|
|||
Some(lit) => match lit.kind {
|
||||
ast::LitKind::Str(symbol_unescaped, style) => Ok(ast::StrLit {
|
||||
style,
|
||||
symbol: lit.token.symbol,
|
||||
suffix: lit.token.suffix,
|
||||
symbol: lit.token_lit.symbol,
|
||||
suffix: lit.token_lit.suffix,
|
||||
span: lit.span,
|
||||
symbol_unescaped,
|
||||
}),
|
||||
|
@ -1828,7 +1828,7 @@ impl<'a> Parser<'a> {
|
|||
let suffixless_lit = token::Lit::new(lit.kind, lit.symbol, None);
|
||||
let symbol = Symbol::intern(&suffixless_lit.to_string());
|
||||
let lit = token::Lit::new(token::Err, symbol, lit.suffix);
|
||||
Some(Lit::from_lit_token(lit, span).unwrap_or_else(|_| unreachable!()))
|
||||
Some(Lit::from_token_lit(lit, span).unwrap_or_else(|_| unreachable!()))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue