Skip to content

Trait suggestions ignore visibility #68871

Closed
@wbl

Description

@wbl

Every so often the compiler will helpfully suggest importing trait x::y::z to fix a missing method. But the compiler doesn't realize that x::y::z isn't visible, and x::z, or x::y'::z is the import that will work. Is it possible for the compiler in making trait suggestions to be aware of the visibility of the traits it suggests?

This is closely related to #31323 I believe.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions