Rollup merge of #100107 - klensy:tr-w, r=compiler-errors
fix trailing whitespace in error message
This commit is contained in:
commit
551224019b
@ -2736,7 +2736,7 @@ impl<'b, 'v> Visitor<'v> for ConditionVisitor<'b> {
|
|||||||
self.errors.push((
|
self.errors.push((
|
||||||
e.span,
|
e.span,
|
||||||
format!(
|
format!(
|
||||||
"if the `for` loop runs 0 times, {} is not initialized ",
|
"if the `for` loop runs 0 times, {} is not initialized",
|
||||||
self.name
|
self.name
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
|
@ -4,7 +4,7 @@ error[E0381]: used binding `x` is possibly-uninitialized
|
|||||||
LL | let mut x: isize;
|
LL | let mut x: isize;
|
||||||
| ----- binding declared here but left uninitialized
|
| ----- binding declared here but left uninitialized
|
||||||
LL | for _ in 0..0 { x = 10; }
|
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;
|
LL | return x;
|
||||||
| ^ `x` used here but it is possibly-uninitialized
|
| ^ `x` used here but it is possibly-uninitialized
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user