Closed
Description
Given the following code:
pub fn main() {
let _ = "hello world".iter();
}
The current output is:
error[E0599]: no method named `iter` found for reference `&'static str` in the current scope
--> src/main.rs:2:23
|
2 | let _ = "hello world".iter();
| ^^^^ method not found in `&'static str`
For more information about this error, try `rustc --explain E0599`.
Ideally the output should look like:
maybe add a "did you mean .chars()
?" suggestion and underline the .iter()
or something?
Activity
&str.chars()
on attempt to&str.iter()
#90803Rollup merge of rust-lang#90803 - TaKO8Ki:suggest-chars-on-attempt-to…
Rollup merge of rust-lang#90803 - TaKO8Ki:suggest-chars-on-attempt-to…