- Notifications
You must be signed in to change notification settings - Fork 14k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lints
Description
Trying to compile:
struct Foo { x: int } impl Fo { fn foo() {} } fn main() {}gives the unhelpful error:
main.rs:5:5: 5:7 error: found value name used as a type: def_mod({crate: 0, node: 13}) main:rs:5 impl Fo { ^~ A better error message would be:
error: use of undeclared type name `Fo` Even better would be, if it could recognize the typo:
error: use of undeclared type name `Fo`. Did you mean `Foo`? Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lints