Skip to content

Commit

Permalink
Fix duplication of braces around const generic argument in non-full mode
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jul 9, 2023
1 parent d757cf4 commit a4fc6b1
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 a4fc6b1

Please sign in to comment.