about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-08-03 22:30:49 +0200
committerGitHub <noreply@github.com>2022-08-03 22:30:49 +0200
commit551224019b657828193ff7968eee228bed2c1897 (patch)
tree1e9254870646cf1b443aaddb32c84bd84bc3ae16
parent9c04ffbab261a624cff631c3a581ab08fe35dbdb (diff)
parent0548e8ed064623b5f5e72c79d7c9e4258f7cbc58 (diff)
downloadrust-551224019b657828193ff7968eee228bed2c1897.tar.gz
rust-551224019b657828193ff7968eee228bed2c1897.zip
Rollup merge of #100107 - klensy:tr-w, r=compiler-errors
fix trailing whitespace in error message
-rw-r--r--compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs2
-rw-r--r--src/test/ui/borrowck/borrowck-for-loop-uninitialized-binding.stderr2
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
index 5da260f980f..8c23756db33 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 c08c93f3617..fc1a44c3ca0 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