Closed
Description
This compiles:
mod Foo {}
struct Foo;
fn main() {}
but this doesn't:
mod Foo {}
struct Bar;
type Foo = Bar;
fn main() {}
<anon>:3:1: 3:16 error: duplicate definition of type or module `Foo`
<anon>:3 type Foo = Bar;
^~~~~~~~~~~~~~~
<anon>:1:1: 1:11 note: first definition of type or module `Foo` here
<anon>:1 mod Foo {}
^~~~~~~~~~
I'd have expected both to either succeed or fail.