Closed
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`?