Skip to content

Commit caef0f4

Browse files
authored
Merge pull request #20400 from rust-lang/veykril/push-ksxzmxqymsto
Disable error log for position clamping, its too noisy due to ease of triggering
2 parents 7a8db55 + 5022fb6 commit caef0f4

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

crates/rust-analyzer/src/lsp/from_proto.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,13 @@ pub(crate) fn offset(
4040
})?;
4141
let col = TextSize::from(line_col.col);
4242
let clamped_len = col.min(line_range.len());
43-
if clamped_len < col {
44-
tracing::error!(
45-
"Position {line_col:?} column exceeds line length {}, clamping it",
46-
u32::from(line_range.len()),
47-
);
48-
}
43+
// FIXME: The cause for this is likely our request retrying. Commented out as this log is just too chatty and very easy to trigger.
44+
// if clamped_len < col {
45+
// tracing::error!(
46+
// "Position {line_col:?} column exceeds line length {}, clamping it",
47+
// u32::from(line_range.len()),
48+
// );
49+
// }
4950
Ok(line_range.start() + clamped_len)
5051
}
5152

0 commit comments

Comments
 (0)