diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/for/for-c-in-str.stderr | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/for/for-c-in-str.stderr b/src/test/ui/for/for-c-in-str.stderr new file mode 100644 index 000000000..07ddc8ea7 --- /dev/null +++ b/src/test/ui/for/for-c-in-str.stderr @@ -0,0 +1,12 @@ +error[E0277]: `&str` is not an iterator + --> $DIR/for-c-in-str.rs:4:14 + | +LL | for c in "asdf" { + | ^^^^^^ `&str` is not an iterator; try calling `.chars()` or `.bytes()` + | + = help: the trait `Iterator` is not implemented for `&str` + = note: required because of the requirements on the impl of `IntoIterator` for `&str` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0277`. |