Skip to content

Commit 37f264d

Browse files
committed
Rust: correct line and column numbers in printed error messages
1 parent ca2b8ef commit 37f264d

File tree

1 file changed

+1
-1
lines changed
  • rust/extractor/src/translate

1 file changed

+1
-1
lines changed

rust/extractor/src/translate/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ impl Translator {
8484
}
8585
pub fn emit_parse_error(&mut self, path: &str, err: SyntaxError) {
8686
let (start, end) = self.location(err.range());
87-
log::warn!("{}:{}:{}: {}", path, start.line, start.col, err);
87+
log::warn!("{}:{}:{}: {}", path, start.line + 1, start.col + 1, err);
8888
let message = err.to_string();
8989
let location = self.trap.emit_location_label(self.label, start, end);
9090
self.trap.emit_diagnostic(

0 commit comments

Comments
 (0)