misc: remove stale comment

This commit is contained in:
Kat Marchán 2021-09-20 22:26:08 -07:00
parent 1a0f359e3c
commit 2cff68449c
1 changed files with 0 additions and 9 deletions

View File

@ -72,15 +72,6 @@ fn context_info<'a>(
offset += 1;
}
// These lines are commented as a hat-tip towards better failures. For the
// case of error reporting _specifically_, exposing a bug in your own
// error span calculation code by crashing with an opaque fmt::Error is
// not ideal. Instead, we go ahead and return what we've collected so far
// in out-of-range cases and just let it render without or with a missing
// label.
//
// Old code is left here in case we change our minds and we want to bring back more strict calculation.
if offset >= (span.offset() + span.len()).saturating_sub(1) {
let starting_offset = before_lines_starts.get(0).copied().unwrap_or_else(|| {
if line_count > 0 {