Skip to content

E0433 should do fuzzy matching to look for types that would be valid #87791

Closed
@estebank

Description

@estebank

The following code

    let _ = string::new();

produces:

error[E0433]: failed to resolve: use of undeclared crate or module `string`
 --> src/main.rs:2:13
  |
2 |     let _ = string::new();
  |             ^^^^^^ use of undeclared crate or module `string`

We should be doing fuzzy matching like we do in other cases and suggest changing string to String.

Metadata

Metadata

Assignees

Labels

A-diagnosticsArea: Messages for errors, warnings, and lintsA-resolveArea: Name/path resolution done by `rustc_resolve` specificallyA-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`C-enhancementCategory: An issue proposing an enhancement or a PR with one.D-newcomer-roadblockDiagnostics: Confusing error or lint; hard to understand for new users.D-papercutDiagnostics: An error or lint that needs small tweaks.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions