Skip to content

Suggests to initialize struct with private fields, instead of looking for typo #39226

Closed
@nagisa

Description

@nagisa

I typo’d handle (local variable) with Handle (type with private fields I have no access to). Would have expected rustc to not emit such a note and maybe look for typos instead.

error[E0423]: expected value, found struct `Handle`
   |
73 |                     handle: Handle,
   |                             ^^^^^^ did you mean `Handle { /* fields */ }`?

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