Skip to content

Commit f996c3b

Browse files
committed
Update to handle upstream file name handling change
1 parent 3a8f76b commit f996c3b

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

flake.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/binary_analysis/reconstruct.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use rustc_data_structures::fx::FxHashMap;
44
use rustc_middle::mir::mono::MonoItem;
55
use rustc_middle::ty::{Instance, TyCtxt};
66
use rustc_middle::{mir, ty};
7-
use rustc_span::{BytePos, DUMMY_SP, FileName, Span};
7+
use rustc_span::{BytePos, DUMMY_SP, FileName, RemapPathScopeComponents, Span};
88

99
use crate::ctxt::AnalysisCtxt;
1010
use crate::diagnostic::use_stack::UseSiteKind;
@@ -47,7 +47,7 @@ pub fn recover_span_from_line_no<'tcx>(
4747
let mut found_file = None;
4848
for file in source_map.files().iter() {
4949
if let FileName::Real(real) = &file.name {
50-
if real.local_path_if_available() == location.file {
50+
if real.path(RemapPathScopeComponents::DEBUGINFO) == location.file {
5151
found_file = Some(file.clone());
5252
}
5353
}

0 commit comments

Comments
 (0)