Revert "Use CachingSourceMapView::byte_pos_to_line_and_col instead of SourceMap::lookup_char_pos"

This reverts commit eb4fc45310.

It caused a panic while compiling simple-raytracer
This commit is contained in:
bjorn3 2020-02-03 21:36:36 +01:00
parent eb4fc45310
commit fbe36ad68a
2 changed files with 11 additions and 18 deletions

View file

@ -3,8 +3,6 @@ mod line_info;
use crate::prelude::*;
use rustc_span::CachingSourceMapView;
use cranelift_codegen::ir::{StackSlots, ValueLabel, ValueLoc};
use cranelift_codegen::isa::RegUnit;
use cranelift_codegen::ValueLocRange;
@ -36,8 +34,6 @@ pub struct DebugContext<'tcx> {
unit_range_list: RangeList,
types: HashMap<Ty<'tcx>, UnitEntryId>,
source_map: CachingSourceMapView<'tcx>,
}
impl<'tcx> DebugContext<'tcx> {
@ -102,8 +98,6 @@ impl<'tcx> DebugContext<'tcx> {
unit_range_list: RangeList(Vec::new()),
types: HashMap::new(),
source_map: CachingSourceMapView::new(tcx.sess.source_map()),
}
}