mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
Add debug info to invalid offset error
This commit is contained in:
parent
29e5cdfb05
commit
5a7f2dd4b0
@ -37,8 +37,9 @@ pub(crate) fn offset(
|
||||
.ok_or_else(|| format_err!("Invalid wide col offset"))?
|
||||
}
|
||||
};
|
||||
let text_size =
|
||||
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())
|
||||
})?;
|
||||
Ok(text_size)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user