Skip to content

Compile error with ambiguous shortcut import resolving #1228

Closed
@lht

Description

@lht
mod foo {
  mod bar {
    mod foo {
      fn i() {}
    }
  }
  mod baz {
      fn x() {
      }
  }
}

fn main() {
    import foo::baz;
    import foo::bar::foo;
}
imp.rs:14:4: 14:19 error: unresolved import: baz
imp.rs:14     import foo::baz;
              ^~~~~~~~~~~~~~~
error: aborting due to previous errors
rust: upcall fail 'explicit failure', ../src/comp/driver/session.rs:70
rust: domain main @0x97dee28 root task failed

It would be nice to suggest using an alias instead of complaining an "unresolved" error.

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