diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2022-01-31 11:16:22 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-31 11:16:22 +0000 |
| commit | 0808ade4e43157f96ddaca8fa39f436038c3ede0 (patch) | |
| tree | 96b81bfe1964164f3932cf38a32c6f1136bfa323 /tests/mir-opt/lower_array_len.array_len_raw.NormalizeArrayLen.diff | |
| parent | 66870ca0edc6c06f3e574c677918426a16796080 (diff) | |
| parent | b7cabf1e443b2f9f944747c2124639abacedaf40 (diff) | |
| download | rust-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 'tests/mir-opt/lower_array_len.array_len_raw.NormalizeArrayLen.diff')
0 files changed, 0 insertions, 0 deletions
