@@ -10,16 +10,16 @@ use crate::build::ForGuard::{self, OutsideGuard, RefWithinGuard};
1010use crate :: build:: { BlockAnd , BlockAndExtension , Builder } ;
1111use crate :: build:: { GuardFrame , GuardFrameLocal , LocalsForNode } ;
1212use crate :: hair:: { self , * } ;
13+ use rustc_ast:: ast:: Name ;
14+ use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
15+ use rustc_hir:: HirId ;
16+ use rustc_index:: bit_set:: BitSet ;
1317use rustc_middle:: middle:: region;
1418use rustc_middle:: mir:: * ;
1519use rustc_middle:: ty:: layout:: VariantIdx ;
1620use rustc_middle:: ty:: { self , CanonicalUserTypeAnnotation , Ty } ;
17- use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
18- use rustc_hir:: HirId ;
19- use rustc_index:: bit_set:: BitSet ;
2021use rustc_span:: Span ;
2122use smallvec:: { smallvec, SmallVec } ;
22- use rustc_ast:: ast:: Name ;
2323
2424// helper functions, broken out by category:
2525mod simplify;
@@ -83,7 +83,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
8383 /// * From each otherwise block to the next prebinding block.
8484 crate fn match_expr (
8585 & mut self ,
86- destination : & Place < ' tcx > ,
86+ destination : Place < ' tcx > ,
8787 span : Span ,
8888 mut block : BasicBlock ,
8989 scrutinee : ExprRef < ' tcx > ,
@@ -218,7 +218,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
218218 /// `outer_source_info` is the SourceInfo for the whole match.
219219 fn lower_match_arms (
220220 & mut self ,
221- destination : & Place < ' tcx > ,
221+ destination : Place < ' tcx > ,
222222 scrutinee_place : Place < ' tcx > ,
223223 scrutinee_span : Span ,
224224 arm_candidates : Vec < ( & ' _ Arm < ' tcx > , Candidate < ' _ , ' tcx > ) > ,
@@ -364,7 +364,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
364364 PatKind :: Binding { mode : BindingMode :: ByValue , var, subpattern : None , .. } => {
365365 let place =
366366 self . storage_live_binding ( block, var, irrefutable_pat. span , OutsideGuard , true ) ;
367- unpack ! ( block = self . into( & place, block, initializer) ) ;
367+ unpack ! ( block = self . into( place, block, initializer) ) ;
368368
369369 // Inject a fake read, see comments on `FakeReadCause::ForLet`.
370370 let source_info = self . source_info ( irrefutable_pat. span ) ;
@@ -399,7 +399,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
399399 } => {
400400 let place =
401401 self . storage_live_binding ( block, var, irrefutable_pat. span , OutsideGuard , true ) ;
402- unpack ! ( block = self . into( & place, block, initializer) ) ;
402+ unpack ! ( block = self . into( place, block, initializer) ) ;
403403
404404 // Inject a fake read, see comments on `FakeReadCause::ForLet`.
405405 let pattern_source_info = self . source_info ( irrefutable_pat. span ) ;
@@ -1691,7 +1691,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
16911691 let scrutinee_source_info = self . source_info ( scrutinee_span) ;
16921692 for & ( place, temp) in fake_borrows {
16931693 let borrow = Rvalue :: Ref ( re_erased, BorrowKind :: Shallow , place) ;
1694- self . cfg . push_assign ( block, scrutinee_source_info, & Place :: from ( temp) , borrow) ;
1694+ self . cfg . push_assign ( block, scrutinee_source_info, Place :: from ( temp) , borrow) ;
16951695 }
16961696
16971697 // the block to branch to if the guard fails; if there is no
@@ -1858,7 +1858,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
18581858 match binding. binding_mode {
18591859 BindingMode :: ByValue => {
18601860 let rvalue = Rvalue :: Ref ( re_erased, BorrowKind :: Shared , binding. source ) ;
1861- self . cfg . push_assign ( block, source_info, & ref_for_guard, rvalue) ;
1861+ self . cfg . push_assign ( block, source_info, ref_for_guard, rvalue) ;
18621862 }
18631863 BindingMode :: ByRef ( borrow_kind) => {
18641864 let value_for_arm = self . storage_live_binding (
@@ -1870,9 +1870,9 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
18701870 ) ;
18711871
18721872 let rvalue = Rvalue :: Ref ( re_erased, borrow_kind, binding. source ) ;
1873- self . cfg . push_assign ( block, source_info, & value_for_arm, rvalue) ;
1873+ self . cfg . push_assign ( block, source_info, value_for_arm, rvalue) ;
18741874 let rvalue = Rvalue :: Ref ( re_erased, BorrowKind :: Shared , value_for_arm) ;
1875- self . cfg . push_assign ( block, source_info, & ref_for_guard, rvalue) ;
1875+ self . cfg . push_assign ( block, source_info, ref_for_guard, rvalue) ;
18761876 }
18771877 }
18781878 }
@@ -1910,7 +1910,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
19101910 Rvalue :: Ref ( re_erased, borrow_kind, binding. source )
19111911 }
19121912 } ;
1913- self . cfg . push_assign ( block, source_info, & local, rvalue) ;
1913+ self . cfg . push_assign ( block, source_info, local, rvalue) ;
19141914 }
19151915 }
19161916
0 commit comments