Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

error: duplicate definition of type or module Status #144

Closed
ursic opened this issue Sep 21, 2014 · 4 comments · Fixed by #145
Closed

error: duplicate definition of type or module Status #144

ursic opened this issue Sep 21, 2014 · 4 comments · Fixed by #145

Comments

@ursic
Copy link

ursic commented Sep 21, 2014

status.rs:20:1: 24:2 error: duplicate definition of type or module `Status`
rust-http/codegen/src/status.rs:20 struct Status {
rust-http/codegen/src/status.rs:21     code: uint,
rust-http/codegen/src/status.rs:22     reason: &'static str,
rust-http/codegen/src/status.rs:23     comment: Option<&'static str>,
rust-http/codegen/src/status.rs:24 }
rust-http/codegen/src/status.rs:17:5: 17:19 note: first definition of type or module `Status` here
rust-http/codegen/src/status.rs:17     Status(Status),
                                       ^~~~~~~~~~~~~~
@shamansir
Copy link

Same thing for me, seems it's an example of this expected failure. I wonder why it started to fail just now.

@shamansir
Copy link

If you need a quick, but very-very dirty fix (I've renamed root Status in HeadingOrStatus to _Status), here's the status.rs that works (replace it for Cargo or locally): https://gist.github.com/shamansir/86c7df143e67bd2369e5

But it's a very bad behavior to use it!

@Ogeon
Copy link
Collaborator

Ogeon commented Sep 21, 2014

Apparently because of #17338. The only solution is to rename the struct or the enum variant. This has no effect on the final API, so any name will do, as long as it's sane. Maybe rename the struct to HttpStatus, or something?

@reem
Copy link
Collaborator

reem commented Sep 22, 2014

Closed via #145.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants