Skip to content

Fix duplication of braces around const generic argument in non-full mode#1482

Merged
dtolnay merged 1 commit intomasterfrom
nonfullconstarg
Jul 9, 2023
Merged

Fix duplication of braces around const generic argument in non-full mode#1482
dtolnay merged 1 commit intomasterfrom
nonfullconstarg

Conversation

@dtolnay
Copy link
Copy Markdown
Owner

@dtolnay dtolnay commented Jul 9, 2023

Fixes serde-rs/serde#2414.

In non-"full" mode, syn parses Generic<{ BAR as u8 }> with a GenericArgument::Const containing Expr::Verbatim (because the data structures for Expr::Block are not available). But then, it wrongly printed that out as Generic<{ { BAR as u8 } }>, leading to bogus warnings in generated code.

@dtolnay dtolnay merged commit cefa056 into master Jul 9, 2023
@dtolnay dtolnay deleted the nonfullconstarg branch July 9, 2023 04:06
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

Successfully merging this pull request may close these issues.

unused_braces lint in Deserialize macro with braced GAT type conversion

1 participant