@@ -523,7 +523,9 @@ impl BorrowKind {
523
523
pub fn allows_two_phase_borrow ( & self ) -> bool {
524
524
match * self {
525
525
BorrowKind :: Shared | BorrowKind :: Shallow | BorrowKind :: Unique => false ,
526
- BorrowKind :: Mut { allow_two_phase_borrow } => allow_two_phase_borrow,
526
+ BorrowKind :: Mut {
527
+ allow_two_phase_borrow,
528
+ } => allow_two_phase_borrow,
527
529
}
528
530
}
529
531
}
@@ -596,7 +598,7 @@ pub enum ImplicitSelfKind {
596
598
MutRef ,
597
599
/// Represents when a function does not have a self argument or
598
600
/// when a function has a `self: X` argument.
599
- None
601
+ None ,
600
602
}
601
603
602
604
CloneTypeFoldableAndLiftImpls ! { BindingForm <' tcx>, }
@@ -820,8 +822,7 @@ impl<'tcx> LocalDecl<'tcx> {
820
822
pat_span : _,
821
823
} ) ) ) => true ,
822
824
823
- Some ( ClearCrossCrate :: Set ( BindingForm :: ImplicitSelf ( ImplicitSelfKind :: Imm ) ) )
824
- => true ,
825
+ Some ( ClearCrossCrate :: Set ( BindingForm :: ImplicitSelf ( ImplicitSelfKind :: Imm ) ) ) => true ,
825
826
826
827
_ => false ,
827
828
}
@@ -873,12 +874,7 @@ impl<'tcx> LocalDecl<'tcx> {
873
874
}
874
875
875
876
#[ inline]
876
- fn new_local (
877
- ty : Ty < ' tcx > ,
878
- mutability : Mutability ,
879
- internal : bool ,
880
- span : Span ,
881
- ) -> Self {
877
+ fn new_local ( ty : Ty < ' tcx > , mutability : Mutability , internal : bool , span : Span ) -> Self {
882
878
LocalDecl {
883
879
mutability,
884
880
ty,
@@ -1603,13 +1599,15 @@ impl<'tcx> TerminatorKind<'tcx> {
1603
1599
Scalar :: Bits {
1604
1600
bits : u,
1605
1601
size : size. bytes ( ) as u8 ,
1606
- } . into ( ) ,
1602
+ }
1603
+ . into ( ) ,
1607
1604
) ,
1608
1605
ty : switch_ty,
1609
1606
} ;
1610
1607
fmt_const_val ( & mut s, & c) . unwrap ( ) ;
1611
1608
s. into ( )
1612
- } ) . chain ( iter:: once ( "otherwise" . into ( ) ) )
1609
+ } )
1610
+ . chain ( iter:: once ( "otherwise" . into ( ) ) )
1613
1611
. collect ( )
1614
1612
}
1615
1613
Call {
@@ -1843,9 +1841,11 @@ impl<'tcx> Debug for Statement<'tcx> {
1843
1841
ref outputs,
1844
1842
ref inputs,
1845
1843
} => write ! ( fmt, "asm!({:?} : {:?} : {:?})" , asm, outputs, inputs) ,
1846
- AscribeUserType ( ref place, ref variance, ref c_ty) => {
1847
- write ! ( fmt, "AscribeUserType({:?}, {:?}, {:?})" , place, variance, c_ty)
1848
- }
1844
+ AscribeUserType ( ref place, ref variance, ref c_ty) => write ! (
1845
+ fmt,
1846
+ "AscribeUserType({:?}, {:?}, {:?})" ,
1847
+ place, variance, c_ty
1848
+ ) ,
1849
1849
Nop => write ! ( fmt, "nop" ) ,
1850
1850
}
1851
1851
}
@@ -1970,8 +1970,8 @@ impl<'tcx> Place<'tcx> {
1970
1970
/// Find the innermost `Local` from this `Place`.
1971
1971
pub fn local ( & self ) -> Option < Local > {
1972
1972
match self {
1973
- Place :: Local ( local) |
1974
- Place :: Projection ( box Projection {
1973
+ Place :: Local ( local)
1974
+ | Place :: Projection ( box Projection {
1975
1975
base : Place :: Local ( local) ,
1976
1976
elem : ProjectionElem :: Deref ,
1977
1977
} ) => Some ( * local) ,
@@ -2701,7 +2701,9 @@ pub struct ClosureOutlivesRequirement<'tcx> {
2701
2701
/// order of the category, thereby influencing diagnostic output.
2702
2702
///
2703
2703
/// See also [rustc_mir::borrow_check::nll::constraints]
2704
- #[ derive( Copy , Clone , Debug , Eq , PartialEq , PartialOrd , Ord , Hash , RustcEncodable , RustcDecodable ) ]
2704
+ #[ derive(
2705
+ Copy , Clone , Debug , Eq , PartialEq , PartialOrd , Ord , Hash , RustcEncodable , RustcDecodable ,
2706
+ ) ]
2705
2707
pub enum ConstraintCategory {
2706
2708
Return ,
2707
2709
TypeAnnotation ,
0 commit comments