Closed
Description
Other compilers (gcc) and editors (Sublime Text, vim) start columns at 1, but the rust compiler starts at 0:
~ echo "int main() { foo }" > tmp.c
~ echo " fn main() { foo }" > tmp.rs
~ gcc tmp.c
tmp.c:1:14: error: 'foo' undeclared (first use in this function)
~ rustc tmp.rs
tmp.rs:1:13: 1:16 error: unresolved name `foo`.
I'm not sure how to fix this properly. My patch simply adds 1 whenever col
is displayed, but maybe it should be changed here? https://github.com/mozilla/rust/blob/master/src/libsyntax/codemap.rs#L148
Metadata
Metadata
Assignees
Labels
No labels