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.
2 parents 29e5cdf + 5a7f2dd commit 52e8065Copy full SHA for 52e8065
crates/rust-analyzer/src/lsp/from_proto.rs
@@ -37,8 +37,9 @@ pub(crate) fn offset(
37
.ok_or_else(|| format_err!("Invalid wide col offset"))?
38
}
39
};
40
- let text_size =
41
- line_index.index.offset(line_col).ok_or_else(|| format_err!("Invalid offset"))?;
+ let text_size = line_index.index.offset(line_col).ok_or_else(|| {
+ format_err!("Invalid offset {line_col:?} (line index length: {:?})", line_index.index.len())
42
+ })?;
43
Ok(text_size)
44
45
0 commit comments