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-30 05:15:11 +08:00
// E0277 should point exclusively at line 6, not the entire for loop span
fn main() {
for c in "asdf" {
2020-06-30 05:15:11 +08: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-30 05:15:11 +08:00
//~| NOTE in this expansion of desugaring of `for` loop
//~| NOTE in this expansion of desugaring of `for` loop
2020-09-07 17:01:45 +08:00
//~| NOTE in this expansion of desugaring of `for` loop
2019-09-13 17:36:35 +08:00
println!();
}
}