Skip to content

Reported path for unresolved named imports is wrong #2123

Closed
@brson

Description

@brson
// error-pattern:unresolved import: m::f
import x = m::f;

mod m {
}

fn main() {
}
../src/test/compile-fail/unresolved-named-import.rs:2:7: 2:16 error: unresolved import: m::x
../src/test/compile-fail/unresolved-named-import.rs:2 import x = m::f;

The error says we failed to resolve m::x but that is incorrect. We failed to resolve x, we failed to find m::f, and m::x doesn't identify a real thing.

Metadata

Metadata

Assignees

Labels

A-resolveArea: Name/path resolution done by `rustc_resolve` specifically

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions