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

Bogus duplicate definition of value error #3186

Closed
Dretch opened this issue Aug 12, 2012 · 2 comments
Closed

Bogus duplicate definition of value error #3186

Dretch opened this issue Aug 12, 2012 · 2 comments
Labels
A-resolve Area: Path resolution

Comments

@Dretch
Copy link
Contributor

Dretch commented Aug 12, 2012

The following code compiles with no warning or error:

enum x {}

enum y { x }

fn main() {}

However if the positions of the enums are reversed then the compile fails with a (I think bogus) error message:

enum y { x }

enum x {}

fn main() {}

The error message is:

test.rs:5:0: 5:9 error: Duplicate definition of value x
test.rs:5 enum x {}
          ^~~~~~~~~
test.rs:3:9: 3:10 note: First definition of value x here:
test.rs:3 enum y { x }
                   ^
error: aborting due to previous error
@brson brson closed this as completed in 395d1ac Aug 13, 2012
@brson
Copy link
Contributor

brson commented Aug 13, 2012

Fixed.

@Dretch
Copy link
Contributor Author

Dretch commented Aug 14, 2012

Thanks!

On 13 August 2012 23:19, Brian Anderson notifications@github.com wrote:

Fixed.


Reply to this email directly or view it on GitHubhttps://github.com//issues/3186#issuecomment-7710120.

bors pushed a commit to rust-lang-ci/rust that referenced this issue May 15, 2021
Update `rustc-ap-*` crates to 290.0.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-resolve Area: Path resolution
Projects
None yet
Development

No branches or pull requests

2 participants