@@ -67,7 +67,7 @@ impl<'a> Visitor<'a> for ItemLowerer<'a, '_, '_> {
6767 if let Some ( hir_id) = item_hir_id {
6868 self . lctx . with_parent_item_lifetime_defs ( hir_id, |this| {
6969 let this = & mut ItemLowerer { lctx : this } ;
70- if let ItemKind :: Impl { ref of_trait, .. } = item. kind {
70+ if let ItemKind :: Impl { ref of_trait, .. } = * item. kind {
7171 this. with_trait_impl_ref ( of_trait, |this| visit:: walk_item ( this, item) ) ;
7272 } else {
7373 visit:: walk_item ( this, item) ;
@@ -182,7 +182,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
182182 }
183183
184184 pub ( super ) fn lower_item_id ( & mut self , i : & Item ) -> SmallVec < [ hir:: ItemId ; 1 ] > {
185- let node_ids = match i. kind {
185+ let node_ids = match * i. kind {
186186 ItemKind :: Use ( ref use_tree) => {
187187 let mut vec = smallvec ! [ i. id] ;
188188 self . lower_item_id_use_tree ( use_tree, i. id , & mut vec) ;
@@ -228,7 +228,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
228228 let mut vis = self . lower_visibility ( & i. vis , None ) ;
229229 let attrs = self . lower_attrs ( & i. attrs ) ;
230230
231- if let ItemKind :: MacroDef ( MacroDef { ref body, macro_rules } ) = i. kind {
231+ if let ItemKind :: MacroDef ( MacroDef { ref body, macro_rules } ) = * i. kind {
232232 if !macro_rules || self . sess . contains_name ( & i. attrs , sym:: macro_export) {
233233 let hir_id = self . lower_node_id ( i. id ) ;
234234 let body = P ( self . lower_mac_args ( body) ) ;
@@ -697,7 +697,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
697697 hir_id : self . lower_node_id ( i. id ) ,
698698 ident : i. ident ,
699699 attrs : self . lower_attrs ( & i. attrs ) ,
700- kind : match i. kind {
700+ kind : match * i. kind {
701701 ForeignItemKind :: Fn ( _, ref sig, ref generics, _) => {
702702 let fdec = & sig. decl ;
703703 let ( generics, ( fn_dec, fn_args) ) = self . add_in_band_defs (
@@ -797,7 +797,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
797797 fn lower_trait_item ( & mut self , i : & AssocItem ) -> hir:: TraitItem < ' hir > {
798798 let trait_item_def_id = self . resolver . local_def_id ( i. id ) ;
799799
800- let ( generics, kind) = match i. kind {
800+ let ( generics, kind) = match * i. kind {
801801 AssocItemKind :: Const ( _, ref ty, ref default) => {
802802 let ty = self . lower_ty ( ty, ImplTraitContext :: disallowed ( ) ) ;
803803 let body = default. as_ref ( ) . map ( |x| self . lower_const_body ( i. span , Some ( x) ) ) ;
@@ -839,7 +839,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
839839 }
840840
841841 fn lower_trait_item_ref ( & mut self , i : & AssocItem ) -> hir:: TraitItemRef {
842- let ( kind, has_default) = match & i. kind {
842+ let ( kind, has_default) = match & * i. kind {
843843 AssocItemKind :: Const ( _, _, default) => ( hir:: AssocItemKind :: Const , default. is_some ( ) ) ,
844844 AssocItemKind :: TyAlias ( _, _, _, default) => {
845845 ( hir:: AssocItemKind :: Type , default. is_some ( ) )
@@ -862,7 +862,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
862862 fn lower_impl_item ( & mut self , i : & AssocItem ) -> hir:: ImplItem < ' hir > {
863863 let impl_item_def_id = self . resolver . local_def_id ( i. id ) ;
864864
865- let ( generics, kind) = match & i. kind {
865+ let ( generics, kind) = match & * i. kind {
866866 AssocItemKind :: Const ( _, ty, expr) => {
867867 let ty = self . lower_ty ( ty, ImplTraitContext :: disallowed ( ) ) ;
868868 (
@@ -935,7 +935,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
935935 span : i. span ,
936936 vis : self . lower_visibility ( & i. vis , Some ( i. id ) ) ,
937937 defaultness,
938- kind : match & i. kind {
938+ kind : match & * i. kind {
939939 AssocItemKind :: Const ( ..) => hir:: AssocItemKind :: Const ,
940940 AssocItemKind :: TyAlias ( ..) => hir:: AssocItemKind :: Type ,
941941 AssocItemKind :: Fn ( _, sig, ..) => {
0 commit comments