Skip to content

Unadorned path should resolve same as relative path written w.r.t. self/super #6291

Closed
@alexcrichton

Description

@alexcrichton

The following test should have all imports as valid:

use a;        // bad
use self::a;  // good
use a::b;     // good

mod a {
  pub type b = int;
}
mod b {
  use a;        // bad
  use super::a; // good
  use a::b;     // good
}

Apparently resolve isn't realizing that use a is equivalent to use super::a. A little more discussion can be found in #6226

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-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