Skip to content

Commit

Permalink
Change precedence test's syn Fold name to match lbrustc MutVisitor's …
Browse files Browse the repository at this point in the history
…name
  • Loading branch information
dtolnay committed Dec 10, 2023
1 parent e67e3ba commit 83519a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_precedence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ fn syn_parenthesize(syn_expr: syn::Expr) -> syn::Expr {
use syn::fold::{fold_expr, fold_generic_argument, Fold};
use syn::{token, BinOp, Expr, ExprParen, GenericArgument, MetaNameValue, Pat, Stmt, Type};

struct ParenthesizeEveryExpr;
struct FullyParenthesize;

fn parenthesize(expr: Expr) -> Expr {
Expr::Paren(ExprParen {
Expand Down Expand Up @@ -394,7 +394,7 @@ fn syn_parenthesize(syn_expr: syn::Expr) -> syn::Expr {
}
}

impl Fold for ParenthesizeEveryExpr {
impl Fold for FullyParenthesize {
fn fold_expr(&mut self, expr: Expr) -> Expr {
let needs_paren = needs_paren(&expr);
let folded = fold_expr(self, expr);
Expand Down Expand Up @@ -442,7 +442,7 @@ fn syn_parenthesize(syn_expr: syn::Expr) -> syn::Expr {
}
}

let mut folder = ParenthesizeEveryExpr;
let mut folder = FullyParenthesize;
folder.fold_expr(syn_expr)
}

Expand Down

0 comments on commit 83519a6

Please sign in to comment.