Auto merge of #45758 - nzig:explain-span-ctxt, r=petrochenkov

Add comment explaining the ctxt field in Span

As discussed in #45747.

r? @petrochenkov
This commit is contained in:
bors
2017-11-06 05:16:15 +00:00
+5 -3
View File
@@ -59,9 +59,11 @@ pub fn data(self) -> SpanData {
const CTXT_INDEX: usize = 2;
// Tag = 0, inline format.
// -----------------------------------
// | base 31:8 | len 7:1 | tag 0:0 |
// -----------------------------------
// -------------------------------------------------------------
// | base 31:8 | len 7: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];