diff options
| author | Johannes Altmanninger <aclopte@gmail.com> | 2024-10-05 08:44:26 +0200 |
|---|---|---|
| committer | Johannes Altmanninger <aclopte@gmail.com> | 2024-10-18 15:07:13 +0200 |
| commit | 00318bacbac315c39e4902d13c0bf73ec3519220 (patch) | |
| tree | 047b17b30ae88035928833d35f6668a3b0e175d4 /compiler/rustc_codegen_llvm/src | |
| parent | 8305c1927aa2c65a697a1fc3537bfb0d92aaf2ff (diff) | |
| download | rust-00318bacbac315c39e4902d13c0bf73ec3519220.tar.gz rust-00318bacbac315c39e4902d13c0bf73ec3519220.zip | |
Clamp Position::character to line length
LSP says about Position::character > If the character value is greater than the line length it defaults back to the line length. but from_proto::offset() doesn't implement this. A client might for example request code actions for a whole line by sending Position::character=99999. I don't think there is ever a reason (besides laziness) why the client can't specify the line length instead but I guess we should not crash but follow protocol. Technically it should be a warning, not an error but warning is not shown by default so keep it at error I guess. Fixes #18240
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
