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

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

Merged
merged 1 commit into from Jul 9, 2023

Conversation

dtolnay
Copy link
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
28 checks passed
@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