Skip to content

Commit

Permalink
Update test suite to nightly-2024-04-28
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Apr 28, 2024
1 parent b70a8e7 commit 79a80eb
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions tests/test_precedence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,10 @@ fn librustc_parse_and_rewrite(input: &str) -> Option<P<ast::Expr>> {
fn librustc_parenthesize(mut librustc_expr: P<ast::Expr>) -> P<ast::Expr> {
use rustc_ast::ast::{
AssocItem, AssocItemKind, Attribute, BinOpKind, Block, BorrowKind, BoundConstness, Expr,
ExprField, ExprKind, GenericArg, GenericBound, ItemKind, Local, LocalKind, Pat, Stmt,
StmtKind, StructExpr, StructRest, TraitBoundModifiers, Ty,
ExprField, ExprKind, GenericArg, GenericBound, Local, LocalKind, Pat, Stmt, StmtKind,
StructExpr, StructRest, TraitBoundModifiers, Ty,
};
use rustc_ast::mut_visit::{noop_flat_map_assoc_item, noop_visit_item_kind, MutVisitor};
use rustc_ast::mut_visit::{noop_flat_map_item, MutVisitor};
use rustc_data_structures::flat_map_in_place::FlatMapInPlace;
use rustc_span::DUMMY_SP;
use smallvec::SmallVec;
Expand Down Expand Up @@ -327,15 +327,6 @@ fn librustc_parenthesize(mut librustc_expr: P<ast::Expr>) -> P<ast::Expr> {
}
}

fn visit_item_kind(&mut self, item: &mut ItemKind) {
match item {
ItemKind::Const(const_item)
if !const_item.generics.params.is_empty()
|| !const_item.generics.where_clause.predicates.is_empty() => {}
_ => noop_visit_item_kind(item, self),
}
}

fn flat_map_trait_item(&mut self, item: P<AssocItem>) -> SmallVec<[P<AssocItem>; 1]> {
match &item.kind {
AssocItemKind::Const(const_item)
Expand All @@ -344,7 +335,7 @@ fn librustc_parenthesize(mut librustc_expr: P<ast::Expr>) -> P<ast::Expr> {
{
SmallVec::from([item])
}
_ => noop_flat_map_assoc_item(item, self),
_ => noop_flat_map_item(item, self),
}
}

Expand All @@ -356,7 +347,7 @@ fn librustc_parenthesize(mut librustc_expr: P<ast::Expr>) -> P<ast::Expr> {
{
SmallVec::from([item])
}
_ => noop_flat_map_assoc_item(item, self),
_ => noop_flat_map_item(item, self),
}
}

Expand Down

0 comments on commit 79a80eb

Please sign in to comment.