Skip to content

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

Description

@pawelchcki

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions