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

Adjacently tagged empty tuple variant or struct variant generates broken Serialize #1247

Closed
dtolnay opened this issue May 7, 2018 · 0 comments

Comments

@dtolnay
Copy link
Member

dtolnay commented May 7, 2018

#[derive(Serialize)]
#[serde(tag = "t", content = "c")]
enum E {
    A {}, // same for `A()`
}
error[E0392]: parameter `'__a` is never used
  --> src/main.rs:68:10
   |
68 | #[derive(Serialize)]
   |          ^^^^^^^^^ unused type parameter
   |
   = help: consider removing `'__a` or using a marker such as `std::marker::PhantomData`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant