summary refs log tree commit diff
path: root/src/test/ui/iterators/array.stderr
blob: 68c6de5493f1343bfbf8b14f93b566b601780a60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
error[E0277]: `[{integer}; 2]` is not an iterator
  --> $DIR/array.rs:2:14
   |
LL |     for _ in [1, 2] {}
   |              ^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
   |
   = help: the trait `Iterator` is not implemented for `[{integer}; 2]`
   = note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
   = note: required because of the requirements on the impl of `IntoIterator` for `[{integer}; 2]`
   = note: required by `into_iter`

error[E0277]: `[{integer}; 2]` is not an iterator
  --> $DIR/array.rs:5:14
   |
LL |     for _ in x {}
   |              ^ borrow the array with `&` or call `.iter()` on it to iterate over it
   |
   = help: the trait `Iterator` is not implemented for `[{integer}; 2]`
   = note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
   = note: required because of the requirements on the impl of `IntoIterator` for `[{integer}; 2]`
   = note: required by `into_iter`

error[E0277]: `[{float}; 2]` is not an iterator
  --> $DIR/array.rs:7:14
   |
LL |     for _ in [1.0, 2.0] {}
   |              ^^^^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
   |
   = help: the trait `Iterator` is not implemented for `[{float}; 2]`
   = note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
   = note: required because of the requirements on the impl of `IntoIterator` for `[{float}; 2]`
   = note: required by `into_iter`

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0277`.