about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2018-12-12 08:46:18 +1100
committerNicholas Nethercote <nnethercote@mozilla.com>2018-12-12 09:06:43 +1100
commit08857c1c5743133ac309820640ef0755c82fedb7 (patch)
tree1c975a2c744ef828167c5f760e5e0fc24ae0d770 /src/libsyntax/parse
parent8375ab4ff43474c73e3572c2b226560f8cc8e695 (diff)
downloadrust-08857c1c5743133ac309820640ef0755c82fedb7.tar.gz
rust-08857c1c5743133ac309820640ef0755c82fedb7.zip
XXX: SymbolIndex
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/token.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index 8e4d3c0166b..ed746657459 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -207,6 +207,10 @@ pub enum Token {
     Eof,
 }
 
+// `Token` is used a lot. Make sure it doesn't unintentionally get bigger.
+#[cfg(target_arch = "x86_64")]
+static_assert!(MEM_SIZE_OF_STATEMENT: mem::size_of::<Token>() == 16);
+
 impl Token {
     pub fn interpolated(nt: Nonterminal) -> Token {
         Token::Interpolated(Lrc::new((nt, LazyTokenStream::new())))