rust/tests/ui/for/for-c-in-str.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
553 B
Rust
Raw Normal View History

2020-06-29 16:15:11 -05:00
// E0277 should point exclusively at line 6, not the entire for loop span
fn main() {
for c in "asdf" {
2020-06-29 16:15:11 -05:00
//~^ ERROR `&str` is not an iterator
//~| NOTE `&str` is not an iterator
//~| HELP the trait `Iterator` is not implemented for `&str`
//~| NOTE required for `&str` to implement `IntoIterator`
2020-06-29 16:15:11 -05:00
//~| NOTE in this expansion of desugaring of `for` loop
//~| NOTE in this expansion of desugaring of `for` loop
2020-09-07 04:01:45 -05:00
//~| NOTE in this expansion of desugaring of `for` loop
2019-09-13 04:36:35 -05:00
println!();
}
}