We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9315177 commit 000c451Copy full SHA for 000c451
compiler/rustc_codegen_llvm/src/gotoc/utils.rs
@@ -43,12 +43,12 @@ impl<'tcx> GotocCtx<'tcx> {
43
let lo = smap.lookup_char_pos(sp.lo());
44
let line = lo.line;
45
let col = 1 + lo.col_display;
46
- Location::new(
47
- lo.file.name.prefer_remapped().to_string_lossy().to_string(),
48
- self.fname_option(),
49
- line,
50
- Some(col),
51
- )
+ let filename0 = lo.file.name.prefer_remapped().to_string_lossy().to_string();
+ let filename1 = match std::fs::canonicalize(filename0.clone()) {
+ Ok(pathbuf) => pathbuf.to_str().unwrap().to_string(),
+ Err(_) => filename0,
+ };
+ Location::new(filename1, self.fname_option(), line, Some(col))
52
}
53
54
/// Dereference a boxed type `std::boxed::Box<T>` to get a `*T`.
0 commit comments