diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-05-23 12:22:43 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-05-27 14:05:02 +1000 |
| commit | 21f28448e0cab81ad5697a9c01ef8dda9f730c27 (patch) | |
| tree | 32f643d7312d34e18da1188b8940fafde71f56a8 /src/libsyntax/parse | |
| parent | 9c7d28d4fdd95bcd6062fb82a2dd2f280bda3e72 (diff) | |
| download | rust-21f28448e0cab81ad5697a9c01ef8dda9f730c27.tar.gz rust-21f28448e0cab81ad5697a9c01ef8dda9f730c27.zip | |
Add `to_symbol` methods.
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/literal.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/parse/literal.rs b/src/libsyntax/parse/literal.rs index 80bb89ef81a..58573093127 100644 --- a/src/libsyntax/parse/literal.rs +++ b/src/libsyntax/parse/literal.rs @@ -193,14 +193,14 @@ impl LitKind { } LitKind::Int(n, ty) => { let suffix = match ty { - ast::LitIntType::Unsigned(ty) => Some(Symbol::intern(ty.ty_to_string())), - ast::LitIntType::Signed(ty) => Some(Symbol::intern(ty.ty_to_string())), + ast::LitIntType::Unsigned(ty) => Some(ty.to_symbol()), + ast::LitIntType::Signed(ty) => Some(ty.to_symbol()), ast::LitIntType::Unsuffixed => None, }; (token::Integer, sym::integer(n), suffix) } LitKind::Float(symbol, ty) => { - (token::Float, symbol, Some(Symbol::intern(ty.ty_to_string()))) + (token::Float, symbol, Some(ty.to_symbol())) } LitKind::FloatUnsuffixed(symbol) => { (token::Float, symbol, None) |
