Skip to content

Incorrect span with bad imports #6074

Closed

Description

use foo::bar;

generates:

k.rs:1:4: 1:13 error: unresolved name
k.rs:1 use foo::bar;
           ^~~~~~~~~
k.rs:1:4: 1:13 error: failed to resolve import: foo::bar
k.rs:1 use foo::bar;
           ^~~~~~~~~
error: failed to resolve imports
error: aborting due to 3 previous errors

I believe the span on the first error should just cover foo, not the whole path (that is a path, yes?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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