We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b2eed72 commit 3e810c6Copy full SHA for 3e810c6
compiler/rustc_span/src/lib.rs
@@ -1270,7 +1270,9 @@ impl<S: Encoder> Encodable<S> for SourceFile {
1270
// the lines list is sorted and individual lines are
1271
// probably not that long. Because of that we can store lines
1272
// as a difference list, using as little space as possible
1273
- // for the differences.
+ // for the differences. But note that the first line is
1274
+ // always encoded as a `BytePos` because its position is
1275
+ // often much larger than any of the differences.
1276
let max_line_length = if lines.len() == 1 {
1277
0
1278
} else {
0 commit comments