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

Enum without associated value, causes derive macro to hit "entered unreachable code" error #13

Open
pawelchcki opened this issue Sep 6, 2021 · 1 comment

Comments

@pawelchcki
Copy link

steps to reproduce:

Attempt to use enum like this one:

#[derive(Serialize, Deserialize, OpgModel)]
#[serde(tag = "req_type", content = "content")]
pub enum Repro {
    TypeA(),
    TybeB
}

Error:

error: proc-macro derive panicked
  --> src/data.rs:64:34
   |
64 | #[derive(Serialize, Deserialize, OpgModel)]
   |                                  ^^^^^^^^
   |
   = help: message: internal error: entered unreachable code

error: aborting due to previous error

error: could not compile `...`

Just encountered this error, using this awesome! crate. Haven't yet had time to dig deeper.

@Rexagon
Copy link
Owner

Rexagon commented Sep 6, 2021

Thanks for the report, will be fixed soon!

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

No branches or pull requests

2 participants