-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-libtestArea: `#[test]` / the `test` libraryArea: `#[test]` / the `test` libraryC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
STR
// test.rs
#[test]
fn mat() {}
mod mat {
// NB Necessary to have a test here
#[test]
fn col() {}
}
Output
test.rs:1:1: 1:1 error: a type named `mat` has already been imported in this module
test.rs:1 // test.rs
^
error: aborting due to previous error
If you expand the file, you can see the collision:
$ rustc --pretty=expanded --test test.rs
// ...
pub mod __test_reexports {
#[prelude_import]
use std::prelude::*;
pub use super::mat; // <---
pub use super::mat::__test_reexports as mat; // <---
}
// ...
Version
rustc 0.13.0-dev (3a8f4ec32 2014-11-04 11:11:20 +0000)
Metadata
Metadata
Assignees
Labels
A-libtestArea: `#[test]` / the `test` libraryArea: `#[test]` / the `test` libraryC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.