@@ -67,7 +67,7 @@ impl<'a> Visitor<'a> for ItemLowerer<'a, '_, '_> {
67
67
if let Some ( hir_id) = item_hir_id {
68
68
self . lctx . with_parent_item_lifetime_defs ( hir_id, |this| {
69
69
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 {
71
71
this. with_trait_impl_ref ( of_trait, |this| visit:: walk_item ( this, item) ) ;
72
72
} else {
73
73
visit:: walk_item ( this, item) ;
@@ -182,7 +182,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
182
182
}
183
183
184
184
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 {
186
186
ItemKind :: Use ( ref use_tree) => {
187
187
let mut vec = smallvec ! [ i. id] ;
188
188
self . lower_item_id_use_tree ( use_tree, i. id , & mut vec) ;
@@ -228,7 +228,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
228
228
let mut vis = self . lower_visibility ( & i. vis , None ) ;
229
229
let attrs = self . lower_attrs ( & i. attrs ) ;
230
230
231
- if let ItemKind :: MacroDef ( MacroDef { ref body, macro_rules } ) = i. kind {
231
+ if let ItemKind :: MacroDef ( MacroDef { ref body, macro_rules } ) = * i. kind {
232
232
if !macro_rules || self . sess . contains_name ( & i. attrs , sym:: macro_export) {
233
233
let hir_id = self . lower_node_id ( i. id ) ;
234
234
let body = P ( self . lower_mac_args ( body) ) ;
@@ -697,7 +697,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
697
697
hir_id : self . lower_node_id ( i. id ) ,
698
698
ident : i. ident ,
699
699
attrs : self . lower_attrs ( & i. attrs ) ,
700
- kind : match i. kind {
700
+ kind : match * i. kind {
701
701
ForeignItemKind :: Fn ( _, ref sig, ref generics, _) => {
702
702
let fdec = & sig. decl ;
703
703
let ( generics, ( fn_dec, fn_args) ) = self . add_in_band_defs (
@@ -797,7 +797,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
797
797
fn lower_trait_item ( & mut self , i : & AssocItem ) -> hir:: TraitItem < ' hir > {
798
798
let trait_item_def_id = self . resolver . local_def_id ( i. id ) ;
799
799
800
- let ( generics, kind) = match i. kind {
800
+ let ( generics, kind) = match * i. kind {
801
801
AssocItemKind :: Const ( _, ref ty, ref default) => {
802
802
let ty = self . lower_ty ( ty, ImplTraitContext :: disallowed ( ) ) ;
803
803
let body = default. as_ref ( ) . map ( |x| self . lower_const_body ( i. span , Some ( x) ) ) ;
@@ -839,7 +839,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
839
839
}
840
840
841
841
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 {
843
843
AssocItemKind :: Const ( _, _, default) => ( hir:: AssocItemKind :: Const , default. is_some ( ) ) ,
844
844
AssocItemKind :: TyAlias ( _, _, _, default) => {
845
845
( hir:: AssocItemKind :: Type , default. is_some ( ) )
@@ -862,7 +862,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
862
862
fn lower_impl_item ( & mut self , i : & AssocItem ) -> hir:: ImplItem < ' hir > {
863
863
let impl_item_def_id = self . resolver . local_def_id ( i. id ) ;
864
864
865
- let ( generics, kind) = match & i. kind {
865
+ let ( generics, kind) = match & * i. kind {
866
866
AssocItemKind :: Const ( _, ty, expr) => {
867
867
let ty = self . lower_ty ( ty, ImplTraitContext :: disallowed ( ) ) ;
868
868
(
@@ -935,7 +935,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
935
935
span : i. span ,
936
936
vis : self . lower_visibility ( & i. vis , Some ( i. id ) ) ,
937
937
defaultness,
938
- kind : match & i. kind {
938
+ kind : match & * i. kind {
939
939
AssocItemKind :: Const ( ..) => hir:: AssocItemKind :: Const ,
940
940
AssocItemKind :: TyAlias ( ..) => hir:: AssocItemKind :: Type ,
941
941
AssocItemKind :: Fn ( _, sig, ..) => {
0 commit comments