Skip to content

Commit

Permalink
Auto merge of #89049 - Aaron1011:caching-sourcemap-assert, r=Mark-Sim…
Browse files Browse the repository at this point in the history
…ulacrum

Convert `debug_assert` to `assert` in `CachingSourceMapView`

I suspect that there's a bug somewhere in this code, which is
leading to the `predicates_of` ICE being seen in #89035
  • Loading branch information
bors committed Sep 19, 2021
2 parents 7b5f952 + 95bea15 commit 5ecc8ad
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions compiler/rustc_span/src/caching_source_map_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,13 @@ impl<'sm> CachingSourceMapView<'sm> {

// Span lo and hi may equal line end when last line doesn't
// end in newline, hence the inclusive upper bounds below.
debug_assert!(span_data.lo >= lo.line.start);
debug_assert!(span_data.lo <= lo.line.end);
debug_assert!(span_data.hi >= hi.line.start);
debug_assert!(span_data.hi <= hi.line.end);
debug_assert!(lo.file.contains(span_data.lo));
debug_assert!(lo.file.contains(span_data.hi));
debug_assert_eq!(lo.file_index, hi.file_index);
assert!(span_data.lo >= lo.line.start);
assert!(span_data.lo <= lo.line.end);
assert!(span_data.hi >= hi.line.start);
assert!(span_data.hi <= hi.line.end);
assert!(lo.file.contains(span_data.lo));
assert!(lo.file.contains(span_data.hi));
assert_eq!(lo.file_index, hi.file_index);

Some((
lo.file.clone(),
Expand Down

0 comments on commit 5ecc8ad

Please sign in to comment.