Skip to content

Commit

Permalink
Directly call more specific expr ToTokens impl
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jul 9, 2023
1 parent 24c48cd commit e523c36
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -692,13 +692,13 @@ pub(crate) mod printing {
GenericArgument::Lifetime(lt) => lt.to_tokens(tokens),
GenericArgument::Type(ty) => ty.to_tokens(tokens),
GenericArgument::Const(expr) => match expr {
Expr::Lit(_) => expr.to_tokens(tokens),
Expr::Lit(expr) => expr.to_tokens(tokens),

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

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

// ERROR CORRECTION: Add braces to make sure that the
// generated code is valid.
Expand Down

0 comments on commit e523c36

Please sign in to comment.