From 41e236a0df8d27dc9f28dba370d72bde612d073a Mon Sep 17 00:00:00 2001 From: Jacob Asper <78604367+20jasper@users.noreply.github.com> Date: Wed, 12 Nov 2025 15:26:05 -0500 Subject: [PATCH 1/2] Fix typo in comment in rustc_errors It seems "CharPose" was a typo since I couldn't find any references to it anywhere else in the codebase --- compiler/rustc_errors/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index 2f88e587ae9f..82e265c32bfa 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -348,7 +348,7 @@ impl CodeSuggestion { hi_opt: Option<&Loc>, ) -> usize { let mut line_count = 0; - // Convert CharPos to Usize, as CharPose is character offset + // Convert `CharPos` to `Usize`, as `CharPos` is character offset // Extract low index and high index let (lo, hi_opt) = (lo.col.to_usize(), hi_opt.map(|hi| hi.col.to_usize())); if let Some(line) = line_opt { From 548b5d2406cb0a79d67e745dc3bf45e7eddbb607 Mon Sep 17 00:00:00 2001 From: Jacob Asper <78604367+20jasper@users.noreply.github.com> Date: Sat, 22 Nov 2025 22:25:51 -0500 Subject: [PATCH 2/2] lowercase usize Co-authored-by: Kivooeo <75776246+Kivooeo@users.noreply.github.com> --- compiler/rustc_errors/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index 82e265c32bfa..1e70e54cf10c 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -348,7 +348,7 @@ impl CodeSuggestion { hi_opt: Option<&Loc>, ) -> usize { let mut line_count = 0; - // Convert `CharPos` to `Usize`, as `CharPos` is character offset + // Convert `CharPos` to `usize`, as `CharPos` is character offset // Extract low index and high index let (lo, hi_opt) = (lo.col.to_usize(), hi_opt.map(|hi| hi.col.to_usize())); if let Some(line) = line_opt {