-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.D-invalid-suggestionDiagnostics: A structured suggestion resulting in incorrect code.Diagnostics: A structured suggestion resulting in incorrect code.D-verboseDiagnostics: Too much output caused by a single piece of incorrect code.Diagnostics: Too much output caused by a single piece of incorrect code.T-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
struct S {
m: HashMap<String, ()>,
}
error[E0412]: cannot find type `HashMap` in this scope
--> src/main.rs:2:8
|
2 | m: HashMap<String, ()>,
| ^^^^^^^ not found in this scope
|
help: consider importing one of these items
|
1 | use std::collections::HashMap;
|
1 | use std::collections::hash_map::HashMap;
|
The std::collections::hash_map::HashMap
suggestion here is just noise, it's (almost?) never what we actually want the person to import.
This issue has been assigned to @ayushmishra2005 via this comment.
joshtriplett and leonardo-m
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.D-invalid-suggestionDiagnostics: A structured suggestion resulting in incorrect code.Diagnostics: A structured suggestion resulting in incorrect code.D-verboseDiagnostics: Too much output caused by a single piece of incorrect code.Diagnostics: Too much output caused by a single piece of incorrect code.T-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.