Skip to content

Commit ae66285

Browse files
debuginfo: Always set column information to zero for source locations.
1 parent dc7a2e1 commit ae66285

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustc/middle/trans/debuginfo.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2128,7 +2128,8 @@ fn set_debug_location(cx: &mut CrateContext, debug_location: DebugLocation) {
21282128
let metadata_node;
21292129

21302130
match debug_location {
2131-
KnownLocation { scope, line, col } => {
2131+
KnownLocation { scope, line, .. } => {
2132+
let col = 0; // Always set the column to zero like Clang and GCC
21322133
debug!("setting debug location to {} {}", line, col);
21332134
let elements = [C_i32(line as i32), C_i32(col as i32), scope, ptr::null()];
21342135
unsafe {

0 commit comments

Comments
 (0)