2015-01-16 16:25:45 -06:00
|
|
|
struct T;
|
|
|
|
|
|
|
|
mod t1 {
|
|
|
|
type Foo = ::T;
|
2017-05-17 22:29:58 -05:00
|
|
|
mod Foo {} //~ ERROR the name `Foo` is defined multiple times
|
2015-01-16 16:25:45 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
mod t2 {
|
|
|
|
type Foo = ::T;
|
2017-05-17 22:29:58 -05:00
|
|
|
struct Foo; //~ ERROR the name `Foo` is defined multiple times
|
2015-01-16 16:25:45 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
mod t3 {
|
|
|
|
type Foo = ::T;
|
2017-05-17 22:29:58 -05:00
|
|
|
enum Foo {} //~ ERROR the name `Foo` is defined multiple times
|
2015-01-16 16:25:45 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
mod t4 {
|
|
|
|
type Foo = ::T;
|
|
|
|
fn Foo() {} // ok
|
|
|
|
}
|
|
|
|
|
|
|
|
mod t5 {
|
|
|
|
type Bar<T> = T;
|
2017-05-17 22:29:58 -05:00
|
|
|
mod Bar {} //~ ERROR the name `Bar` is defined multiple times
|
2015-01-16 16:25:45 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
mod t6 {
|
|
|
|
type Foo = ::T;
|
|
|
|
impl Foo {} // ok
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fn main() {}
|