Change label span to point at iterator instead of iter item
This commit is contained in:
parent
ed362c07ff
commit
4c96932da7
4 changed files with 19 additions and 13 deletions
|
|
@ -12,13 +12,13 @@ fn main() {
|
|||
let tiles = Default::default();
|
||||
for row in &mut tiles {
|
||||
for tile in row {
|
||||
//~^ NOTE consider giving this a type
|
||||
//~^ NOTE the element type for this iterator is not specified
|
||||
*tile = 0;
|
||||
//~^ ERROR type annotations needed
|
||||
//~| NOTE cannot infer type for `_`
|
||||
//~| NOTE type must be known at this point
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let tiles: [[usize; 3]; 3] = tiles;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ error[E0282]: type annotations needed
|
|||
--> $DIR/issue-51116.rs:16:13
|
||||
|
|
||||
LL | for tile in row {
|
||||
| ---- consider giving this a type
|
||||
LL | //~^ NOTE consider giving this a type
|
||||
| --- the element type for this iterator is not specified
|
||||
LL | //~^ NOTE the element type for this iterator is not specified
|
||||
LL | *tile = 0;
|
||||
| ^^^^^ cannot infer type for `_`
|
||||
|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue