We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a5f76e commit 4a003ccCopy full SHA for 4a003cc
src/tools/rust-analyzer/lib/ungrammar/src/error.rs
@@ -16,7 +16,8 @@ pub struct Error {
16
impl fmt::Display for Error {
17
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
18
if let Some(loc) = self.location {
19
- write!(f, "{}:{}: ", loc.line, loc.column)?
+ // Report 1-based indices, to match text editors
20
+ write!(f, "{}:{}: ", loc.line + 1, loc.column + 1)?
21
}
22
write!(f, "{}", self.message)
23
0 commit comments