diff --git a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs index 5da260f980fbb..8c23756db3313 100644 --- a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs +++ b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs @@ -2736,7 +2736,7 @@ impl<'b, 'v> Visitor<'v> for ConditionVisitor<'b> { self.errors.push(( e.span, format!( - "if the `for` loop runs 0 times, {} is not initialized ", + "if the `for` loop runs 0 times, {} is not initialized", self.name ), )); diff --git a/src/test/ui/borrowck/borrowck-for-loop-uninitialized-binding.stderr b/src/test/ui/borrowck/borrowck-for-loop-uninitialized-binding.stderr index c08c93f361726..fc1a44c3ca04e 100644 --- a/src/test/ui/borrowck/borrowck-for-loop-uninitialized-binding.stderr +++ b/src/test/ui/borrowck/borrowck-for-loop-uninitialized-binding.stderr @@ -4,7 +4,7 @@ error[E0381]: used binding `x` is possibly-uninitialized LL | let mut x: isize; | ----- binding declared here but left uninitialized LL | for _ in 0..0 { x = 10; } - | ---- if the `for` loop runs 0 times, `x` is not initialized + | ---- if the `for` loop runs 0 times, `x` is not initialized LL | return x; | ^ `x` used here but it is possibly-uninitialized