Skip to content

"did you mean" typo suggestion improvement #46332

Closed
@estebank

Description

@estebank

"did you mean" should first try to find the name with different capitalization. A case I just found

error[E0531]: cannot find tuple struct/variant `TyUInt` in module `ty`
   --> src/librustc/infer/error_reporting/mod.rs:680:44
    |
680 |             (&ty::TyRef(_, ref tnm1), &ty::TyUInt(_)) |
    |                                            ^^^^^^ did you mean `TyInt`?

There's a ty::TyUint, which confused me for a few seconds until I noticed the i->I typo and the suggestion hindered instead of helping.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.WG-diagnosticsWorking group: Diagnostics

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions