]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_parse/src/parser/expr.rs
Rename some things related to literals.
[rust.git] / compiler / rustc_parse / src / parser / expr.rs
index 9d6d632c2e89af538f32478788458c569f939a9d..c824566c35ff47789bc57f9977a02f531068f0e0 100644 (file)
@@ -1750,8 +1750,8 @@ pub fn parse_str_lit(&mut self) -> Result<ast::StrLit, Option<Lit>> {
             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 @@ pub(super) fn parse_opt_lit(&mut self) -> Option<Lit> {
                 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!()))
             }
         }
     }