From a4fc6b113b3c3b8316d1fede7881b4b3bdd643e2 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sat, 8 Jul 2023 20:59:12 -0700 Subject: [PATCH] Fix duplication of braces around const generic argument in non-full mode --- src/path.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/path.rs b/src/path.rs index a3ab890284..de8965241e 100644 --- a/src/path.rs +++ b/src/path.rs @@ -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| {