Skip to content

better error message for method not found #2385

@nikomatsakis

Description

@nikomatsakis

It would be nice if we explained better why a method is not found. That is, if you could x.y(), and we find impls in scope that define y() but which do not match the type of x, maybe we could list those impls and their types. Bonus points if you can identify those impls with the "closest" types (we could tweak the inference, for example, to report whether types are just plain wrong or whether they fail in some particular, like mutability---this is mostly extractable from the type_err but it could be made nicer)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-type-systemArea: Type systemC-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions