Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent symbol duplication checking #21546

Closed
vadimcn opened this issue Jan 23, 2015 · 2 comments
Closed

Inconsistent symbol duplication checking #21546

vadimcn opened this issue Jan 23, 2015 · 2 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints

Comments

@vadimcn
Copy link
Contributor

vadimcn commented Jan 23, 2015

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.

@nham
Copy link
Contributor

nham commented Oct 28, 2015

This shouldn't be closed yet. #26421 didn't fix the issue, it only added warnings for it so it can be fixed later.

@nrc
Copy link
Member

nrc commented Nov 24, 2015

Fixed by #29530

@nrc nrc closed this as completed Nov 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints
Projects
None yet
Development

No branches or pull requests

5 participants