chore: Prepare for Rust edition bump to 2024 (without autofix) (#27791)

Successor to #27779 - in this PR I've applied changes manually, without
futzing with if let lifetimes at all.

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz
2025-03-31 20:10:36 +02:00
committed by GitHub
parent d51aa2ffb0
commit 0729d24d77
162 changed files with 2333 additions and 1937 deletions
+3 -3
View File
@@ -610,9 +610,9 @@ impl InlayMap {
let mut to_insert = Vec::new();
let snapshot = &mut self.snapshot;
for i in 0..rng.gen_range(1..=5) {
if self.inlays.is_empty() || rng.gen() {
if self.inlays.is_empty() || rng.r#gen() {
let position = snapshot.buffer.random_byte_range(0, rng).start;
let bias = if rng.gen() { Bias::Left } else { Bias::Right };
let bias = if rng.r#gen() { Bias::Left } else { Bias::Right };
let len = if rng.gen_bool(0.01) {
0
} else {
@@ -1500,7 +1500,7 @@ mod tests {
.unwrap_or(10);
let len = rng.gen_range(0..30);
let buffer = if rng.gen() {
let buffer = if rng.r#gen() {
let text = util::RandomCharIter::new(&mut rng)
.take(len)
.collect::<String>();