diff options
| author | varkor <github@varkor.com> | 2019-09-26 16:56:53 +0100 |
|---|---|---|
| committer | varkor <github@varkor.com> | 2019-09-26 18:21:09 +0100 |
| commit | 17726f6b52b68279384cfb13209f015ab491c1c0 (patch) | |
| tree | 84cc1132b9b4fbe07aee481fc026ea91e4f81683 /src/libsyntax/parse | |
| parent | ce6aabbaa19378ac621c2971934383a146176fec (diff) | |
| download | rust-17726f6b52b68279384cfb13209f015ab491c1c0.tar.gz rust-17726f6b52b68279384cfb13209f015ab491c1c0.zip | |
Rename `Lit.node` to `Lit.kind`
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/attr.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/parse/literal.rs | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/parse/attr.rs b/src/libsyntax/parse/attr.rs index cf6151d17b1..4b2c329625b 100644 --- a/src/libsyntax/parse/attr.rs +++ b/src/libsyntax/parse/attr.rs @@ -249,7 +249,7 @@ impl<'a> Parser<'a> { let lit = self.parse_lit()?; debug!("checking if {:?} is unusuffixed", lit); - if !lit.node.is_unsuffixed() { + if !lit.kind.is_unsuffixed() { let msg = "suffixed literals are not allowed in attributes"; self.diagnostic().struct_span_err(lit.span, msg) .help("instead of using a suffixed literal \ diff --git a/src/libsyntax/parse/literal.rs b/src/libsyntax/parse/literal.rs index 973c54017b6..fcd5b2782fd 100644 --- a/src/libsyntax/parse/literal.rs +++ b/src/libsyntax/parse/literal.rs @@ -255,7 +255,7 @@ impl LitKind { impl Lit { /// Converts literal token into an AST literal. fn from_lit_token(token: token::Lit, span: Span) -> Result<Lit, LitError> { - Ok(Lit { token, node: LitKind::from_lit_token(token)?, span }) + Ok(Lit { token, kind: LitKind::from_lit_token(token)?, span }) } /// Converts arbitrary token into an AST literal. @@ -282,8 +282,8 @@ impl Lit { /// Attempts to recover an AST literal from semantic literal. /// This function is used when the original token doesn't exist (e.g. the literal is created /// by an AST-based macro) or unavailable (e.g. from HIR pretty-printing). - pub fn from_lit_kind(node: LitKind, span: Span) -> Lit { - Lit { token: node.to_lit_token(), node, span } + pub fn from_lit_kind(kind: LitKind, span: Span) -> Lit { + Lit { token: kind.to_lit_token(), kind, span } } /// Losslessly convert an AST literal into a token stream. |
