summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/suggest-remove-refs-5.stderr
blob: 7de84d6122b58f094ec2f72e8744ce7d4f6192b3 (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
37
error[E0277]: `Vec<i32>` is not an iterator
  --> $DIR/suggest-remove-refs-5.rs:4:14
   |
LL |     for _ in &mut &mut v {}
   |              ^^^^^^^^^^^ `Vec<i32>` is not an iterator; try calling `.into_iter()` or `.iter()`
   |
   = help: the trait `Iterator` is not implemented for `Vec<i32>`
   = note: required for `&mut Vec<i32>` to implement `Iterator`
   = note: 3 redundant requirements hidden
   = note: required for `&mut &mut &mut &mut Vec<i32>` to implement `Iterator`
   = note: required for `&mut &mut &mut &mut Vec<i32>` to implement `IntoIterator`
help: consider removing 3 leading `&`-references
   |
LL ~     let v = &mut Vec::<i32>::new();
LL ~     for _ in v {}
   |

error[E0277]: `[u8; 1]` is not an iterator
  --> $DIR/suggest-remove-refs-5.rs:7:14
   |
LL |     for _ in &mut v {}
   |              ^^^^^^ `[u8; 1]` is not an iterator; try calling `.into_iter()` or `.iter()`
   |
   = help: the trait `Iterator` is not implemented for `[u8; 1]`
   = note: required for `&mut [u8; 1]` to implement `Iterator`
   = note: 2 redundant requirements hidden
   = note: required for `&mut &mut &mut [u8; 1]` to implement `Iterator`
   = note: required for `&mut &mut &mut [u8; 1]` to implement `IntoIterator`
help: consider removing 2 leading `&`-references
   |
LL ~     let v = &mut [1u8];
LL ~     for _ in v {}
   |

error: aborting due to 2 previous errors

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