- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
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?
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.