Skip to content

add name bindings for bad imports #31209

Closed
@nrc

Description

@nrc

e.g.,

use foo::bar;

fn main() {
    bar();
}

Assuming bar doesn't exist, we signal two errors here - one on the use and one on the call. We should insert a dummy definition for bar so we don't signal the second error.

Note that this is somewhat fixing a regression caused by #31065

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-resolveArea: Name/path resolution done by `rustc_resolve` specifically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions