about summary refs log tree commit diff
path: root/src/libsyntax_pos
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-04-03 11:27:38 +0000
committerbors <bors@rust-lang.org>2019-04-03 11:27:38 +0000
commit0ba7d41b83132ae681dc8746bf23628f86f8a468 (patch)
tree0477537dc66e00d48cb3d5379170dc5110f2b04a /src/libsyntax_pos
parent546cb21f580ae3d4e0bf42ccecfad4a34defebe7 (diff)
parentff94feabc242f39445a7e27bd418807715775c26 (diff)
downloadrust-0ba7d41b83132ae681dc8746bf23628f86f8a468.tar.gz
rust-0ba7d41b83132ae681dc8746bf23628f86f8a468.zip
Auto merge of #58458 - nnethercote:tweak-Span-encoding, r=petrochenkov
Tweak `Span` encoding.

Failing to fit `base` is more common than failing to fit `len`.
Diffstat (limited to 'src/libsyntax_pos')
-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.
 // ------------------------