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