a39d4fc684
Guard against overflow in `codemap::span_to_lines`. (Revised/expanded version of PR #24976) Make `span_to_lines` to return a `Result`. In `diagnostic`, catch `Err` from `span_to_lines` and print `"(unprintable span)"` instead. ---- There a number of recent issues that report the bug here. See e.g. #24761 and #24954. This change *might* fix them. However, that is *not* its main goal. The main goals are: 1. Make it possible for callers to recover from an error here, and 2. Insert a more conservative check, in that we are also checking that the files match up. ---- As a drive-by, fix #24997 , which was causing my attempts to `make check-stage1` on an `--enable-debug` build to fail. |
||
---|---|---|
.. | ||
ast_map | ||
diagnostics | ||
ext | ||
parse | ||
util | ||
abi.rs | ||
ast_util.rs | ||
ast.rs | ||
attr.rs | ||
codemap.rs | ||
config.rs | ||
diagnostic.rs | ||
feature_gate.rs | ||
fold.rs | ||
lib.rs | ||
owned_slice.rs | ||
ptr.rs | ||
show_span.rs | ||
std_inject.rs | ||
str.rs | ||
test.rs | ||
visit.rs |