Skip to content

Confusing error when using import globbing in test module #16597

Closed
@bkoropoff

Description

@bkoropoff

Problem

Using import globbing in a test module results in a very confusing error.

Code

#![feature(globs)]

mod test {
    use super::*;

    #[test]
    fn test(){}
}

Output

$ rustc --test test.rs 
test.rs:4:9: 4:18 error: import conflicts with type in this module
test.rs:4     use super::*;
                  ^~~~~~~~~
test.rs:1:1: 1:1 note: note conflicting type here
test.rs:1 #![feature(globs)]
          ^
error: aborting due to previous error

After some digging, it turns out the conflict is on __test_reexports. I plan to submit a PR to at least print the name of the conflicting import in the above error message so there's something to go on.

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