Skip to content

Confusing error message when importing * from private modules #9571

Closed
@zeux

Description

@zeux

I have two modules, a.rs and b.rs.

a.rs:

#[crate_type = "lib"];

mod test { pub type I = int; }

b.rs:

#[crate_type = "lib"];

extern mod a;
use a::test::*;

fn foo(i: I) {}

I'm compiling it with rustc:

rustc a.rs
rustc -L . b.rs

It used to work, but it now gives the error message:

b.rs:6:10: 6:11 error: use of undeclared type name `I`

However, the problem here is not with I - the problem is with module (adding pub to test module fixes the error). Is it possible to emit an error at 'use a::test::*' instead?

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