diff --git a/compiler/rustc_span/src/lib.rs b/compiler/rustc_span/src/lib.rs
index 8737e45487e..f44eac63cef 100644
--- a/compiler/rustc_span/src/lib.rs
+++ b/compiler/rustc_span/src/lib.rs
@@ -1270,7 +1270,9 @@ impl<S: Encoder> Encodable<S> for SourceFile {
                     // the lines list is sorted and individual lines are
                     // probably not that long. Because of that we can store lines
                     // as a difference list, using as little space as possible
-                    // for the differences.
+                    // for the differences. But note that the first line is
+                    // always encoded as a `BytePos` because its position is
+                    // often much larger than any of the differences.
                     let max_line_length = if lines.len() == 1 {
                         0
                     } else {