-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
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.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.