]> git.lizzy.rs Git - rust.git/blob - src/test/ui/for/for-c-in-str.rs
Rollup merge of #57107 - mjbshaw:thread_local_test, r=nikomatsakis
[rust.git] / src / test / ui / for / for-c-in-str.rs
1 // E0277 should point exclusively at line 14, 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 `std::iter::Iterator` is not implemented for `&str`
8     //~| NOTE required by `std::iter::IntoIterator::into_iter`
9         println!("");
10     }
11 }