2025-06-09 00:49:05 +05:00
|
|
|
//! Test that duplicate use bindings in same namespace produce error
|
|
|
|
|
|
2014-12-22 21:20:31 -08:00
|
|
|
mod foo {
|
|
|
|
|
pub use self::bar::X;
|
|
|
|
|
use self::bar::X;
|
2017-05-17 20:29:58 -07:00
|
|
|
//~^ ERROR the name `X` is defined multiple times
|
2014-12-22 21:20:31 -08:00
|
|
|
|
|
|
|
|
mod bar {
|
|
|
|
|
pub struct X;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {
|
2016-02-07 23:58:14 +00:00
|
|
|
let _ = foo::X;
|
2014-12-22 21:20:31 -08:00
|
|
|
}
|