|
| 1 | +error[E0599]: no method named `iter` found for reference `&'static str` in the current scope |
| 2 | + --> $DIR/suggest-using-chars.rs:2:19 |
| 3 | + | |
| 4 | +LL | let _ = "foo".iter(); |
| 5 | + | ^^^^ method not found in `&'static str` |
| 6 | + | |
| 7 | +help: because of the in-memory representation of `&str`, to obtain an `Iterator` over each of its codepoint use method `chars` |
| 8 | + | |
| 9 | +LL | let _ = "foo".chars(); |
| 10 | + | ~~~~~ |
| 11 | + |
| 12 | +error[E0599]: no method named `foo` found for reference `&'static str` in the current scope |
| 13 | + --> $DIR/suggest-using-chars.rs:3:19 |
| 14 | + | |
| 15 | +LL | let _ = "foo".foo(); |
| 16 | + | ^^^ method not found in `&'static str` |
| 17 | + |
| 18 | +error[E0599]: no method named `iter` found for struct `String` in the current scope |
| 19 | + --> $DIR/suggest-using-chars.rs:4:33 |
| 20 | + | |
| 21 | +LL | let _ = String::from("bar").iter(); |
| 22 | + | ^^^^ method not found in `String` |
| 23 | + | |
| 24 | +help: because of the in-memory representation of `&str`, to obtain an `Iterator` over each of its codepoint use method `chars` |
| 25 | + | |
| 26 | +LL | let _ = String::from("bar").chars(); |
| 27 | + | ~~~~~ |
| 28 | + |
| 29 | +error[E0599]: no method named `iter` found for reference `&String` in the current scope |
| 30 | + --> $DIR/suggest-using-chars.rs:5:36 |
| 31 | + | |
| 32 | +LL | let _ = (&String::from("bar")).iter(); |
| 33 | + | ^^^^ method not found in `&String` |
| 34 | + | |
| 35 | +help: because of the in-memory representation of `&str`, to obtain an `Iterator` over each of its codepoint use method `chars` |
| 36 | + | |
| 37 | +LL | let _ = (&String::from("bar")).chars(); |
| 38 | + | ~~~~~ |
| 39 | + |
| 40 | +error[E0599]: no method named `iter` found for type `{integer}` in the current scope |
| 41 | + --> $DIR/suggest-using-chars.rs:6:15 |
| 42 | + | |
| 43 | +LL | let _ = 0.iter(); |
| 44 | + | ^^^^ method not found in `{integer}` |
| 45 | + |
| 46 | +error: aborting due to 5 previous errors |
| 47 | + |
| 48 | +For more information about this error, try `rustc --explain E0599`. |
0 commit comments