From 4d34bfd00a57f8a8bdb60ec3f908c5d4256f8a9a Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 12 Apr 2018 19:50:53 +1000 Subject: Change the hashcounts in raw `Lit` variants from usize to u16. This reduces the size of `Token` from 32 bytes to 24 bytes on 64-bit platforms. --- src/libsyntax/parse/token.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libsyntax/parse/token.rs') diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index 8da79f92768..8c76fe30ea4 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -72,9 +72,9 @@ pub enum Lit { Integer(ast::Name), Float(ast::Name), Str_(ast::Name), - StrRaw(ast::Name, usize), /* raw str delimited by n hash symbols */ + StrRaw(ast::Name, u16), /* raw str delimited by n hash symbols */ ByteStr(ast::Name), - ByteStrRaw(ast::Name, usize), /* raw byte str delimited by n hash symbols */ + ByteStrRaw(ast::Name, u16), /* raw byte str delimited by n hash symbols */ } impl Lit { -- cgit 1.4.1-3-g733a5