rust/tests/ui/iterators/string.rs
2023-01-11 09:32:08 +00:00

7 lines
147 B
Rust

fn main() {
for _ in "".to_owned() {}
//~^ ERROR `String` is not an iterator
for _ in "" {}
//~^ ERROR `&str` is not an iterator
}