We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 65d75fd commit 61a0b77Copy full SHA for 61a0b77
src/debuginfo/line_info.rs
@@ -82,12 +82,9 @@ impl DebugContext {
82
match tcx.sess.source_map().lookup_line(span.lo()) {
83
Ok(SourceFileAndLine { sf: file, line }) => {
84
let line_pos = file.lines(|lines| lines[line]);
85
+ let col = file.relative_position(span.lo()) - line_pos;
86
- (
87
- file,
88
- u64::try_from(line).unwrap() + 1,
89
- u64::from((span.lo() - line_pos).to_u32()) + 1,
90
- )
+ (file, u64::try_from(line).unwrap() + 1, u64::from(col.to_u32()) + 1)
91
}
92
Err(file) => (file, 0, 0),
93
0 commit comments