Skip to content

Commit 5512240

Browse files
authored
Rollup merge of rust-lang#100107 - klensy:tr-w, r=compiler-errors
fix trailing whitespace in error message
2 parents 9c04ffb + 0548e8e commit 5512240

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2736,7 +2736,7 @@ impl<'b, 'v> Visitor<'v> for ConditionVisitor<'b> {
27362736
self.errors.push((
27372737
e.span,
27382738
format!(
2739-
"if the `for` loop runs 0 times, {} is not initialized ",
2739+
"if the `for` loop runs 0 times, {} is not initialized",
27402740
self.name
27412741
),
27422742
));

src/test/ui/borrowck/borrowck-for-loop-uninitialized-binding.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0381]: used binding `x` is possibly-uninitialized
44
LL | let mut x: isize;
55
| ----- binding declared here but left uninitialized
66
LL | for _ in 0..0 { x = 10; }
7-
| ---- if the `for` loop runs 0 times, `x` is not initialized
7+
| ---- if the `for` loop runs 0 times, `x` is not initialized
88
LL | return x;
99
| ^ `x` used here but it is possibly-uninitialized
1010

0 commit comments

Comments
 (0)