diff options
| author | bors <bors@rust-lang.org> | 2021-09-19 18:54:31 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-09-19 18:54:31 +0000 |
| commit | 5ecc8ad8462574354a55162a0c16b10eb95e3e70 (patch) | |
| tree | 8b411fd79ab26d2f548c7b02b0baa7078fe29adf /compiler/rustc_span/src | |
| parent | 7b5f95270f1ef7118ef4d3b47428054d23113ad5 (diff) | |
| parent | 95bea1594c8613988e54bd748d6d61fb02f4b562 (diff) | |
| download | rust-5ecc8ad8462574354a55162a0c16b10eb95e3e70.tar.gz rust-5ecc8ad8462574354a55162a0c16b10eb95e3e70.zip | |
Auto merge of #89049 - Aaron1011:caching-sourcemap-assert, r=Mark-Simulacrum
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
Diffstat (limited to 'compiler/rustc_span/src')
| -rw-r--r-- | compiler/rustc_span/src/caching_source_map_view.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler/rustc_span/src/caching_source_map_view.rs b/compiler/rustc_span/src/caching_source_map_view.rs index 8e21b9ff44a..fdabf404a37 100644 --- a/compiler/rustc_span/src/caching_source_map_view.rs +++ b/compiler/rustc_span/src/caching_source_map_view.rs @@ -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(), |
