Skip to content

Commit

Permalink
Merge pull request #1482 from dtolnay/nonfullconstarg
Browse files Browse the repository at this point in the history
Fix duplication of braces around const generic argument in non-full mode
  • Loading branch information
dtolnay authored Jul 9, 2023
2 parents d757cf4 + a4fc6b1 commit cefa056
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,9 @@ pub(crate) mod printing {
#[cfg(feature = "full")]
Expr::Block(_) => expr.to_tokens(tokens),

#[cfg(not(feature = "full"))]
Expr::Verbatim(_) => expr.to_tokens(tokens),

// ERROR CORRECTION: Add braces to make sure that the
// generated code is valid.
_ => token::Brace::default().surround(tokens, |tokens| {
Expand Down

0 comments on commit cefa056

Please sign in to comment.