mirror of
https://github.com/github/codeql.git
synced 2026-04-19 22:14:01 +02:00
Rust: correct line and column numbers in printed error messages
This commit is contained in:
@@ -84,7 +84,7 @@ impl Translator {
|
||||
}
|
||||
pub fn emit_parse_error(&mut self, path: &str, err: SyntaxError) {
|
||||
let (start, end) = self.location(err.range());
|
||||
log::warn!("{}:{}:{}: {}", path, start.line, start.col, err);
|
||||
log::warn!("{}:{}:{}: {}", path, start.line + 1, start.col + 1, err);
|
||||
let message = err.to_string();
|
||||
let location = self.trap.emit_location_label(self.label, start, end);
|
||||
self.trap.emit_diagnostic(
|
||||
|
||||
Reference in New Issue
Block a user