Skip to content

Commit 706c767

Browse files
committed
Allow longer spans in the short format.
1 parent 080d302 commit 706c767

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_span/src/span_encoding.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ pub struct Span {
6262
ctxt_or_zero: u16,
6363
}
6464

65-
const LEN_TAG: u16 = 0b1000_0000_0000_0000;
66-
const MAX_LEN: u32 = 0b0111_1111_1111_1111;
65+
const LEN_TAG: u16 = 0b1111_1111_1111_1111;
66+
const MAX_LEN: u32 = (LEN_TAG as u32) - 1;
6767
const MAX_CTXT: u32 = 0b1111_1111_1111_1111;
6868

6969
/// Dummy span, both position and length are zero, syntax context is zero as well.

0 commit comments

Comments
 (0)