@@ -547,7 +547,7 @@ fn expand_non_macro_stmt(Spanned {node, span: stmt_span}: Stmt, fld: &mut MacroE
547
547
// names, as well... but that should be okay, as long as
548
548
// the new names are gensyms for the old ones.
549
549
// generate fresh names, push them to a new pending list
550
- let idents = pattern_bindings ( & * expanded_pat) ;
550
+ let idents = pattern_bindings ( & expanded_pat) ;
551
551
let mut new_pending_renames =
552
552
idents. iter ( ) . map ( |ident| ( * ident, fresh_name ( * ident) ) ) . collect ( ) ;
553
553
// rewrite the pattern using the new names (the old
@@ -634,7 +634,7 @@ fn rename_in_scope<X, F>(pats: Vec<P<ast::Pat>>,
634
634
{
635
635
// all of the pats must have the same set of bindings, so use the
636
636
// first one to extract them and generate new names:
637
- let idents = pattern_bindings ( & * pats[ 0 ] ) ;
637
+ let idents = pattern_bindings ( & pats[ 0 ] ) ;
638
638
let new_renames = idents. into_iter ( ) . map ( |id| ( id, fresh_name ( id) ) ) . collect ( ) ;
639
639
// apply the renaming, but only to the PatIdents:
640
640
let mut rename_pats_fld = PatIdentRenamer { renames : & new_renames} ;
@@ -659,7 +659,7 @@ impl<'v> Visitor<'v> for PatIdentFinder {
659
659
self . ident_accumulator . push ( path1. node ) ;
660
660
// visit optional subpattern of PatIdent:
661
661
if let Some ( ref subpat) = * inner {
662
- self . visit_pat ( & * * subpat)
662
+ self . visit_pat ( subpat)
663
663
}
664
664
}
665
665
// use the default traversal for non-PatIdents
@@ -679,7 +679,7 @@ fn pattern_bindings(pat: &ast::Pat) -> Vec<ast::Ident> {
679
679
fn fn_decl_arg_bindings ( fn_decl : & ast:: FnDecl ) -> Vec < ast:: Ident > {
680
680
let mut pat_idents = PatIdentFinder { ident_accumulator : Vec :: new ( ) } ;
681
681
for arg in & fn_decl. inputs {
682
- pat_idents. visit_pat ( & * arg. pat ) ;
682
+ pat_idents. visit_pat ( & arg. pat ) ;
683
683
}
684
684
pat_idents. ident_accumulator
685
685
}
@@ -1078,7 +1078,7 @@ fn expand_and_rename_fn_decl_and_block(fn_decl: P<ast::FnDecl>, block: P<ast::Bl
1078
1078
fld : & mut MacroExpander )
1079
1079
-> ( P < ast:: FnDecl > , P < ast:: Block > ) {
1080
1080
let expanded_decl = fld. fold_fn_decl ( fn_decl) ;
1081
- let idents = fn_decl_arg_bindings ( & * expanded_decl) ;
1081
+ let idents = fn_decl_arg_bindings ( & expanded_decl) ;
1082
1082
let renames =
1083
1083
idents. iter ( ) . map ( |id| ( * id, fresh_name ( * id) ) ) . collect ( ) ;
1084
1084
// first, a renamer for the PatIdents, for the fn_decl:
@@ -1807,7 +1807,7 @@ foo_module!();
1807
1807
fn pat_idents ( ) {
1808
1808
let pat = string_to_pat (
1809
1809
"(a,Foo{x:c @ (b,9),y:Bar(4,d)})" . to_string ( ) ) ;
1810
- let idents = pattern_bindings ( & * pat) ;
1810
+ let idents = pattern_bindings ( & pat) ;
1811
1811
assert_eq ! ( idents, strs_to_idents( vec!( "a" , "c" , "b" , "d" ) ) ) ;
1812
1812
}
1813
1813
0 commit comments