diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-08-17 12:32:49 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-17 12:32:49 +0200 |
| commit | d5dca26a94437d9b2c2d37cd515f2ac32c30919b (patch) | |
| tree | 4145261e4bd8e70cd79e7422f507c5684ee42eb4 /compiler/rustc_parse | |
| parent | bb77336c0a6708bdebcbf3a1df19b258919b582e (diff) | |
| parent | 5d3cc1713a8816e3b4f10dc2cbaf910b16dc8763 (diff) | |
| download | rust-d5dca26a94437d9b2c2d37cd515f2ac32c30919b.tar.gz rust-d5dca26a94437d9b2c2d37cd515f2ac32c30919b.zip | |
Rollup merge of #100018 - nnethercote:clean-up-LitKind, r=petrochenkov
Clean up `LitKind` r? ``@petrochenkov``
Diffstat (limited to 'compiler/rustc_parse')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index 9d6d632c2e8..c824566c35f 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -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!())) } } } |
