]> git.lizzy.rs Git - rust.git/blob - src/test/ui/iterators/string.stderr
Auto merge of #100845 - timvermeulen:iter_compare, r=scottmcm
[rust.git] / src / test / ui / iterators / string.stderr
1 error[E0277]: `String` is not an iterator
2   --> $DIR/string.rs:2:14
3    |
4 LL |     for _ in "".to_owned() {}
5    |              ^^^^^^^^^^^^^ `String` is not an iterator; try calling `.chars()` or `.bytes()`
6    |
7    = help: the trait `Iterator` is not implemented for `String`
8    = note: required for `String` to implement `IntoIterator`
9
10 error[E0277]: `&str` is not an iterator
11   --> $DIR/string.rs:4:14
12    |
13 LL |     for _ in "" {}
14    |              ^^ `&str` is not an iterator; try calling `.chars()` or `.bytes()`
15    |
16    = help: the trait `Iterator` is not implemented for `&str`
17    = note: required for `&str` to implement `IntoIterator`
18
19 error: aborting due to 2 previous errors
20
21 For more information about this error, try `rustc --explain E0277`.