diff options
| author | Nadav Zingerman <7372858+nzig@users.noreply.github.com> | 2017-11-04 15:54:03 +0200 |
|---|---|---|
| committer | Nadav Zingerman <7372858+nzig@users.noreply.github.com> | 2017-11-04 15:54:03 +0200 |
| commit | 2304b3a7f16812cac7d2b3fcd9aedddadce9c1a2 (patch) | |
| tree | 203b361f872abb09d4915e8f602e9084d8fc71dd /src/libsyntax_pos/span_encoding.rs | |
| parent | a6885cb853390fc79a8ff0b223ea1471e261d60e (diff) | |
| download | rust-2304b3a7f16812cac7d2b3fcd9aedddadce9c1a2.tar.gz rust-2304b3a7f16812cac7d2b3fcd9aedddadce9c1a2.zip | |
Add comment explaining the ctxt field in Span
Diffstat (limited to 'src/libsyntax_pos/span_encoding.rs')
| -rw-r--r-- | src/libsyntax_pos/span_encoding.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libsyntax_pos/span_encoding.rs b/src/libsyntax_pos/span_encoding.rs index c2b32171a9a..1ecfb783b3d 100644 --- a/src/libsyntax_pos/span_encoding.rs +++ b/src/libsyntax_pos/span_encoding.rs @@ -60,8 +60,10 @@ 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]; |
