@@ -766,7 +766,7 @@ impl<'p, 'tcx> RustcMatchCheckCtxt<'p, 'tcx> {
766766 let mut subpatterns = pat. iter_fields ( ) . map ( |p| Box :: new ( cx. hoist_witness_pat ( p) ) ) ;
767767 let kind = match pat. ctor ( ) {
768768 Bool ( b) => PatKind :: Constant { value : mir:: Const :: from_bool ( cx. tcx , * b) } ,
769- IntRange ( range) => return self . hoist_pat_range ( range, pat. ty ( ) ) ,
769+ IntRange ( range) => return self . hoist_pat_range ( range, * pat. ty ( ) ) ,
770770 Struct | Variant ( _) | UnionField => match pat. ty ( ) . kind ( ) {
771771 ty:: Tuple ( ..) => PatKind :: Leaf {
772772 subpatterns : subpatterns
@@ -785,7 +785,7 @@ impl<'p, 'tcx> RustcMatchCheckCtxt<'p, 'tcx> {
785785 RustcMatchCheckCtxt :: variant_index_for_adt ( & pat. ctor ( ) , * adt_def) ;
786786 let variant = & adt_def. variant ( variant_index) ;
787787 let subpatterns = cx
788- . list_variant_nonhidden_fields ( pat. ty ( ) , variant)
788+ . list_variant_nonhidden_fields ( * pat. ty ( ) , variant)
789789 . zip ( subpatterns)
790790 . map ( |( ( field, _ty) , pattern) | FieldPat { field, pattern } )
791791 . collect ( ) ;
@@ -796,7 +796,7 @@ impl<'p, 'tcx> RustcMatchCheckCtxt<'p, 'tcx> {
796796 PatKind :: Leaf { subpatterns }
797797 }
798798 }
799- _ => bug ! ( "unexpected ctor for type {:?} {:?}" , pat. ctor( ) , pat. ty( ) ) ,
799+ _ => bug ! ( "unexpected ctor for type {:?} {:?}" , pat. ctor( ) , * pat. ty( ) ) ,
800800 } ,
801801 // Note: given the expansion of `&str` patterns done in `expand_pattern`, we should
802802 // be careful to reconstruct the correct constant pattern here. However a string
@@ -961,21 +961,21 @@ impl<'p, 'tcx> TypeCx for RustcMatchCheckCtxt<'p, 'tcx> {
961961 self . tcx . features ( ) . exhaustive_patterns
962962 }
963963
964- fn ctor_arity ( & self , ctor : & crate :: constructor:: Constructor < Self > , ty : Self :: Ty ) -> usize {
965- self . ctor_arity ( ctor, ty)
964+ fn ctor_arity ( & self , ctor : & crate :: constructor:: Constructor < Self > , ty : & Self :: Ty ) -> usize {
965+ self . ctor_arity ( ctor, * ty)
966966 }
967967 fn ctor_sub_tys (
968968 & self ,
969969 ctor : & crate :: constructor:: Constructor < Self > ,
970- ty : Self :: Ty ,
970+ ty : & Self :: Ty ,
971971 ) -> & [ Self :: Ty ] {
972- self . ctor_sub_tys ( ctor, ty)
972+ self . ctor_sub_tys ( ctor, * ty)
973973 }
974974 fn ctors_for_ty (
975975 & self ,
976- ty : Self :: Ty ,
976+ ty : & Self :: Ty ,
977977 ) -> Result < crate :: constructor:: ConstructorSet < Self > , Self :: Error > {
978- self . ctors_for_ty ( ty)
978+ self . ctors_for_ty ( * ty)
979979 }
980980
981981 fn debug_pat (
@@ -994,7 +994,7 @@ impl<'p, 'tcx> TypeCx for RustcMatchCheckCtxt<'p, 'tcx> {
994994 overlaps_on : IntRange ,
995995 overlaps_with : & [ & crate :: pat:: DeconstructedPat < ' _ , Self > ] ,
996996 ) {
997- let overlap_as_pat = self . hoist_pat_range ( & overlaps_on, pat. ty ( ) ) ;
997+ let overlap_as_pat = self . hoist_pat_range ( & overlaps_on, * pat. ty ( ) ) ;
998998 let overlaps: Vec < _ > = overlaps_with
999999 . iter ( )
10001000 . map ( |pat| pat. data ( ) . unwrap ( ) . span )
0 commit comments