about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-01-31 11:16:22 +0000
committerGitHub <noreply@github.com>2022-01-31 11:16:22 +0000
commit0808ade4e43157f96ddaca8fa39f436038c3ede0 (patch)
tree96b81bfe1964164f3932cf38a32c6f1136bfa323 /src/test/codegen/src-hash-algorithm
parent66870ca0edc6c06f3e574c677918426a16796080 (diff)
parentb7cabf1e443b2f9f944747c2124639abacedaf40 (diff)
downloadrust-0808ade4e43157f96ddaca8fa39f436038c3ede0.tar.gz
rust-0808ade4e43157f96ddaca8fa39f436038c3ede0.zip
Merge #11182
11182: fix: don't panic on seeing an unexpected offset r=Veykril a=dimbleby

Intended as a fix, or at least a sticking plaster, for #11081.

I have arranged that [offset()](https://github.com/rust-analyzer/rust-analyzer/blob/1ba9a924d7b161c52e605e157ee16d582e4a8684/crates/ide_db/src/line_index.rs#L105-L107) returns `Option<TextSize>` instead of going out of bounds; other changes are the result of following the compiler after doing this.

Perhaps there's still an issue here - I suppose the server and client have gotten out of sync and that probably shouldn't happen in the first place?  I see that https://github.com/rust-analyzer/rust-analyzer/issues/10138#issuecomment-913727554 suggests what sounds like a more substantial fix which I think might be aimed in this direction.  So perhaps that one should be left open to cover such things?

Meanwhile, I hope that not-crashing is a good improvement: and I can confirm that it works out just fine in the repro I have at #11081.

Co-authored-by: David Hotham <david.hotham@metaswitch.com>
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions