From ff94feabc242f39445a7e27bd418807715775c26 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 14 Feb 2019 19:17:07 +1100 Subject: [PATCH] Tweak `Span` encoding. Failing to fit `base` is more common than failing to fit `len`. --- src/libsyntax_pos/span_encoding.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libsyntax_pos/span_encoding.rs b/src/libsyntax_pos/span_encoding.rs index 03d7a9eb74238..743e61e3c2236 100644 --- a/src/libsyntax_pos/span_encoding.rs +++ b/src/libsyntax_pos/span_encoding.rs @@ -74,12 +74,12 @@ const CTXT_INDEX: usize = 2; // Tag = 0, inline format. // ------------------------------------------------------------- -// | base 31:8 | len 7:1 | ctxt (currently 0 bits) | tag 0:0 | +// | base 31:7 | len 6:1 | ctxt (currently 0 bits) | tag 0:0 | // ------------------------------------------------------------- // Since there are zero bits for ctxt, only SpanData with a 0 SyntaxContext // can be inline. -const INLINE_SIZES: [u32; 3] = [24, 7, 0]; -const INLINE_OFFSETS: [u32; 3] = [8, 1, 1]; +const INLINE_SIZES: [u32; 3] = [25, 6, 0]; +const INLINE_OFFSETS: [u32; 3] = [7, 1, 1]; // Tag = 1, interned format. // ------------------------