about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/errors.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-10-18 11:23:05 +0000
committerbors <bors@rust-lang.org>2024-10-18 11:23:05 +0000
commit03cfa8e23444d0ccb97a0f697095a487cf5261c2 (patch)
tree8ee35b0e0d2c5cc87dd0e21aecc5b61b5780756c /compiler/rustc_codegen_llvm/src/errors.rs
parent5b85f1c2d9d171789ad24e4430315d108e163b75 (diff)
parent2af15d2ffdf52480ca3955e82535979f1b80e8e0 (diff)
downloadrust-03cfa8e23444d0ccb97a0f697095a487cf5261c2.tar.gz
rust-03cfa8e23444d0ccb97a0f697095a487cf5261c2.zip
Auto merge of #18243 - krobelus:clamp-position-character, r=Veykril
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.

Not sure how to update Cargo.lock (lib/README.md doesn't say how).

Fixes #18240
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions