Unnamed repository; edit this file 'description' to name the repository.
Merge pull request #20400 from rust-lang/veykril/push-ksxzmxqymsto
Disable error log for position clamping, its too noisy due to ease of triggering
Lukas Wirth 9 months ago
parent 7a8db55 · parent 5022fb6 · commit caef0f4
-rw-r--r--crates/rust-analyzer/src/lsp/from_proto.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/crates/rust-analyzer/src/lsp/from_proto.rs b/crates/rust-analyzer/src/lsp/from_proto.rs
index 02757616d4..333826a179 100644
--- a/crates/rust-analyzer/src/lsp/from_proto.rs
+++ b/crates/rust-analyzer/src/lsp/from_proto.rs
@@ -40,12 +40,13 @@ pub(crate) fn offset(
})?;
let col = TextSize::from(line_col.col);
let clamped_len = col.min(line_range.len());
- if clamped_len < col {
- tracing::error!(
- "Position {line_col:?} column exceeds line length {}, clamping it",
- u32::from(line_range.len()),
- );
- }
+ // FIXME: The cause for this is likely our request retrying. Commented out as this log is just too chatty and very easy to trigger.
+ // if clamped_len < col {
+ // tracing::error!(
+ // "Position {line_col:?} column exceeds line length {}, clamping it",
+ // u32::from(line_range.len()),
+ // );
+ // }
Ok(line_range.start() + clamped_len)
}