about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2019-02-14 19:17:07 +1100
committerNicholas Nethercote <nnethercote@mozilla.com>2019-04-03 10:03:34 +1100
commitff94feabc242f39445a7e27bd418807715775c26 (patch)
tree528706fbd01d223269d48b4d03564f2cd826c6c6
parent428943cc290e64187e0698f41853ef316c0a7d03 (diff)
downloadrust-ff94feabc242f39445a7e27bd418807715775c26.tar.gz
rust-ff94feabc242f39445a7e27bd418807715775c26.zip
Tweak `Span` encoding.
Failing to fit `base` is more common than failing to fit `len`.
-rw-r--r--src/libsyntax_pos/span_encoding.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax_pos/span_encoding.rs b/src/libsyntax_pos/span_encoding.rs
index 03d7a9eb742..743e61e3c22 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.
 // ------------------------