Closed
Description
Code like
mod foo {
struct S;
}
mod foo {
struct P;
}
Generates the error
foo.rs:4:0: 6:1 error: duplicate definition of type `foo`
foo.rs:4 mod foo {
foo.rs:5 struct P;
foo.rs:6 }
foo.rs:1:0: 3:1 note: first definition of type foo here:
foo.rs:1 mod foo {
foo.rs:2 struct S;
foo.rs:3 }
Which is wrong. foo
is not a type, it's a module.