We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 080d302 commit 706c767Copy full SHA for 706c767
compiler/rustc_span/src/span_encoding.rs
@@ -62,8 +62,8 @@ pub struct Span {
62
ctxt_or_zero: u16,
63
}
64
65
-const LEN_TAG: u16 = 0b1000_0000_0000_0000;
66
-const MAX_LEN: u32 = 0b0111_1111_1111_1111;
+const LEN_TAG: u16 = 0b1111_1111_1111_1111;
+const MAX_LEN: u32 = (LEN_TAG as u32) - 1;
67
const MAX_CTXT: u32 = 0b1111_1111_1111_1111;
68
69
/// Dummy span, both position and length are zero, syntax context is zero as well.
0 commit comments