@@ -85,14 +85,14 @@ impl<'a, 'tcx, 'v> Visitor<'v> for BorrowckCtxt<'a, 'tcx> {
8585
8686 fn visit_trait_item ( & mut self , ti : & hir:: TraitItem ) {
8787 if let hir:: ConstTraitItem ( _, Some ( ref expr) ) = ti. node {
88- gather_loans:: gather_loans_in_static_initializer ( self , & * expr) ;
88+ gather_loans:: gather_loans_in_static_initializer ( self , & expr) ;
8989 }
9090 intravisit:: walk_trait_item ( self , ti) ;
9191 }
9292
9393 fn visit_impl_item ( & mut self , ii : & hir:: ImplItem ) {
9494 if let hir:: ImplItemKind :: Const ( _, ref expr) = ii. node {
95- gather_loans:: gather_loans_in_static_initializer ( self , & * expr) ;
95+ gather_loans:: gather_loans_in_static_initializer ( self , & expr) ;
9696 }
9797 intravisit:: walk_impl_item ( self , ii) ;
9898 }
@@ -139,7 +139,7 @@ fn borrowck_item(this: &mut BorrowckCtxt, item: &hir::Item) {
139139 match item. node {
140140 hir:: ItemStatic ( _, _, ref ex) |
141141 hir:: ItemConst ( _, ref ex) => {
142- gather_loans:: gather_loans_in_static_initializer ( this, & * * ex) ;
142+ gather_loans:: gather_loans_in_static_initializer ( this, & ex) ;
143143 }
144144 _ => { }
145145 }
@@ -251,9 +251,9 @@ pub fn build_borrowck_dataflow_data_for_fn<'a, 'tcx>(
251251
252252 let dataflow_data = build_borrowck_dataflow_data ( & mut bccx,
253253 fn_parts. kind ,
254- & * fn_parts. decl ,
254+ & fn_parts. decl ,
255255 cfg,
256- & * fn_parts. body ,
256+ & fn_parts. body ,
257257 fn_parts. span ,
258258 fn_parts. id ) ;
259259
@@ -426,12 +426,12 @@ impl<'tcx> LoanPath<'tcx> {
426426 ( & LpExtend ( ref base, _, LpInterior ( opt_variant_id, id) ) ,
427427 & LpExtend ( ref base2, _, LpInterior ( opt_variant_id2, id2) ) ) =>
428428 if id == id2 && opt_variant_id == opt_variant_id2 {
429- base. has_fork ( & * * base2)
429+ base. has_fork ( & base2)
430430 } else {
431431 true
432432 } ,
433433 ( & LpExtend ( ref base, _, LpDeref ( _) ) , _) => base. has_fork ( other) ,
434- ( _, & LpExtend ( ref base, _, LpDeref ( _) ) ) => self . has_fork ( & * * base) ,
434+ ( _, & LpExtend ( ref base, _, LpDeref ( _) ) ) => self . has_fork ( & base) ,
435435 _ => false ,
436436 }
437437 }
@@ -449,7 +449,7 @@ impl<'tcx> LoanPath<'tcx> {
449449 ( & LpExtend ( ref base, a, LpInterior ( opt_variant_id, id) ) ,
450450 & LpExtend ( ref base2, _, LpInterior ( opt_variant_id2, id2) ) ) => {
451451 if id == id2 && opt_variant_id == opt_variant_id2 {
452- base. common ( & * * base2) . map ( |x| {
452+ base. common ( & base2) . map ( |x| {
453453 let xd = x. depth ( ) ;
454454 if base. depth ( ) == xd && base2. depth ( ) == xd {
455455 assert_eq ! ( base. ty, base2. ty) ;
@@ -463,11 +463,11 @@ impl<'tcx> LoanPath<'tcx> {
463463 }
464464 } )
465465 } else {
466- base. common ( & * * base2)
466+ base. common ( & base2)
467467 }
468468 }
469469 ( & LpExtend ( ref base, _, LpDeref ( _) ) , _) => base. common ( other) ,
470- ( _, & LpExtend ( ref other, _, LpDeref ( _) ) ) => self . common ( & * * other) ,
470+ ( _, & LpExtend ( ref other, _, LpDeref ( _) ) ) => self . common ( & other) ,
471471 ( & LpVar ( id) , & LpVar ( id2) ) => {
472472 if id == id2 {
473473 assert_eq ! ( self . ty, other. ty) ;
@@ -673,7 +673,7 @@ impl<'a, 'tcx> BorrowckCtxt<'a, 'tcx> {
673673 . map
674674 . find ( the_move. id ) {
675675 Some ( hir_map:: NodeExpr ( expr) ) => {
676- ( self . tcx . expr_ty_adjusted ( & * expr) , expr. span )
676+ ( self . tcx . expr_ty_adjusted ( & expr) , expr. span )
677677 }
678678 r => {
679679 self . tcx . sess . bug ( & format ! ( "MoveExpr({}) maps to \
@@ -735,7 +735,7 @@ impl<'a, 'tcx> BorrowckCtxt<'a, 'tcx> {
735735 . map
736736 . find ( the_move. id ) {
737737 Some ( hir_map:: NodeExpr ( expr) ) => {
738- ( self . tcx . expr_ty_adjusted ( & * expr) , expr. span )
738+ ( self . tcx . expr_ty_adjusted ( & expr) , expr. span )
739739 }
740740 r => {
741741 self . tcx . sess . bug ( & format ! ( "Captured({}) maps to \
@@ -833,19 +833,19 @@ impl<'a, 'tcx> BorrowckCtxt<'a, 'tcx> {
833833 err_mutbl => {
834834 let descr = match err. cmt . note {
835835 mc:: NoteClosureEnv ( _) | mc:: NoteUpvarRef ( _) => {
836- self . cmt_to_string ( & * err. cmt )
836+ self . cmt_to_string ( & err. cmt )
837837 }
838838 _ => match opt_loan_path ( & err. cmt ) {
839839 None => {
840840 format ! ( "{} {}" ,
841841 err. cmt. mutbl. to_user_str( ) ,
842- self . cmt_to_string( & * err. cmt) )
842+ self . cmt_to_string( & err. cmt) )
843843 }
844844 Some ( lp) => {
845845 format ! ( "{} {} `{}`" ,
846846 err. cmt. mutbl. to_user_str( ) ,
847- self . cmt_to_string( & * err. cmt) ,
848- self . loan_path_to_string( & * lp) )
847+ self . cmt_to_string( & err. cmt) ,
848+ self . loan_path_to_string( & lp) )
849849 }
850850 }
851851 } ;
@@ -876,7 +876,7 @@ impl<'a, 'tcx> BorrowckCtxt<'a, 'tcx> {
876876 let msg = match opt_loan_path ( & err. cmt ) {
877877 None => "borrowed value" . to_string ( ) ,
878878 Some ( lp) => {
879- format ! ( "`{}`" , self . loan_path_to_string( & * lp) )
879+ format ! ( "`{}`" , self . loan_path_to_string( & lp) )
880880 }
881881 } ;
882882 format ! ( "{} does not live long enough" , msg)
@@ -1051,9 +1051,9 @@ impl<'a, 'tcx> BorrowckCtxt<'a, 'tcx> {
10511051 err_borrowed_pointer_too_short( loan_scope, ptr_scope) => {
10521052 let descr = match opt_loan_path ( & err. cmt ) {
10531053 Some ( lp) => {
1054- format ! ( "`{}`" , self . loan_path_to_string( & * lp) )
1054+ format ! ( "`{}`" , self . loan_path_to_string( & lp) )
10551055 }
1056- None => self . cmt_to_string ( & * err. cmt ) ,
1056+ None => self . cmt_to_string ( & err. cmt ) ,
10571057 } ;
10581058 self . tcx . note_and_explain_region (
10591059 db,
@@ -1081,15 +1081,15 @@ impl<'a, 'tcx> BorrowckCtxt<'a, 'tcx> {
10811081
10821082 LpDowncast ( ref lp_base, variant_def_id) => {
10831083 out. push ( '(' ) ;
1084- self . append_loan_path_to_string ( & * * lp_base, out) ;
1084+ self . append_loan_path_to_string ( & lp_base, out) ;
10851085 out. push_str ( DOWNCAST_PRINTED_OPERATOR ) ;
10861086 out. push_str ( & self . tcx . item_path_str ( variant_def_id) ) ;
10871087 out. push ( ')' ) ;
10881088 }
10891089
10901090
10911091 LpExtend ( ref lp_base, _, LpInterior ( _, InteriorField ( fname) ) ) => {
1092- self . append_autoderefd_loan_path_to_string ( & * * lp_base, out) ;
1092+ self . append_autoderefd_loan_path_to_string ( & lp_base, out) ;
10931093 match fname {
10941094 mc:: NamedField ( fname) => {
10951095 out. push ( '.' ) ;
@@ -1103,13 +1103,13 @@ impl<'a, 'tcx> BorrowckCtxt<'a, 'tcx> {
11031103 }
11041104
11051105 LpExtend ( ref lp_base, _, LpInterior ( _, InteriorElement ( ..) ) ) => {
1106- self . append_autoderefd_loan_path_to_string ( & * * lp_base, out) ;
1106+ self . append_autoderefd_loan_path_to_string ( & lp_base, out) ;
11071107 out. push_str ( "[..]" ) ;
11081108 }
11091109
11101110 LpExtend ( ref lp_base, _, LpDeref ( _) ) => {
11111111 out. push ( '*' ) ;
1112- self . append_loan_path_to_string ( & * * lp_base, out) ;
1112+ self . append_loan_path_to_string ( & lp_base, out) ;
11131113 }
11141114 }
11151115 }
@@ -1122,12 +1122,12 @@ impl<'a, 'tcx> BorrowckCtxt<'a, 'tcx> {
11221122 // For a path like `(*x).f` or `(*x)[3]`, autoderef
11231123 // rules would normally allow users to omit the `*x`.
11241124 // So just serialize such paths to `x.f` or x[3]` respectively.
1125- self . append_autoderefd_loan_path_to_string ( & * * lp_base, out)
1125+ self . append_autoderefd_loan_path_to_string ( & lp_base, out)
11261126 }
11271127
11281128 LpDowncast ( ref lp_base, variant_def_id) => {
11291129 out. push ( '(' ) ;
1130- self . append_autoderefd_loan_path_to_string ( & * * lp_base, out) ;
1130+ self . append_autoderefd_loan_path_to_string ( & lp_base, out) ;
11311131 out. push ( ':' ) ;
11321132 out. push_str ( & self . tcx . item_path_str ( variant_def_id) ) ;
11331133 out. push ( ')' ) ;
0 commit comments