Skip to content

use-ing an item from the current module causes unresolved use errors. #8640

Closed
@brandonson

Description

@brandonson

Something like this should really produce a better error message:

mod foo {                                                                                           
  extern mod extra;                                                                                 

  use foo::extra;                                                                                       
}

/////////////////////////////////
//The error:
//bug-testing.rs:4:6: 4:16 error: unresolved import
//bug-testing.rs:4   use foo::extra;
//                       ^~~~~~~~~~
//error: aborting due to previous error
//////////////////////////////////

Not sure whether current compiler state makes it difficult to identify this and other reasons for failed resolution, but if it's fairly simple better error messages would be great.

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