]> git.lizzy.rs Git - rust.git/blob - tests/ui/for/for-c-in-str.rs
Rollup merge of #105784 - yanns:update_stdarch, r=Amanieu
[rust.git] / tests / ui / for / for-c-in-str.rs
1 // E0277 should point exclusively at line 6, not the entire for loop span
2
3 fn main() {
4     for c in "asdf" {
5         //~^ ERROR `&str` is not an iterator
6         //~| NOTE `&str` is not an iterator
7         //~| HELP the trait `Iterator` is not implemented for `&str`
8         //~| NOTE required for `&str` to implement `IntoIterator`
9         //~| NOTE in this expansion of desugaring of `for` loop
10         //~| NOTE in this expansion of desugaring of `for` loop
11         //~| NOTE in this expansion of desugaring of `for` loop
12         println!();
13     }
14 }