Skip to content

Conversation

@dtolnay
Copy link
Member

@dtolnay dtolnay commented Mar 10, 2023

Affected by this old rustfmt problem: rust-lang/rustfmt#3863

Currently on master, this is clearly not rustfmt-compatible formatting:

syn::Fields::Unnamed(_) | syn::Fields::Unit => {
cx.error_spanned_by(
fields,
"#[serde(tag = \"...\")] can only be used on enums and structs with named fields",
);
}

Neither is this:

syn::Data::Enum(syn::DataEnum { enum_token, .. }) => cx
.error_spanned_by(
enum_token,
"#[serde(default = \"...\")] can only be used on structs with named fields",
),

@dtolnay dtolnay merged commit 0e70f59 into serde-rs:master Mar 10, 2023
@dtolnay dtolnay deleted the msg branch March 10, 2023 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant