Skip to content

Use correct generic names when printing error messages #29315

Closed
@zrneely

Description

@zrneely

I'm sure the title is far too generic (no pun intended), but I'm not sure what else to call it.

Here's an example of the issue: http://is.gd/SpT2Db

It would be nice for new Rust users if we could see, in the error message, the name of the generic whose type could not be inferred, either like this:

error: unable to infer enough type information about `A`; type annotations or generic parameter binding required [E0282]

or like this:

 Foo::<A>::baz();

or even this:

Foo::<_>::baz();

I think any of these would be useful for a new Rust user - as it is, it's easy to get frustrated - "Where's my use of _? There's nothing to fix!"

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions