@@ -120,7 +120,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for LenZero {
120120fn check_trait_items ( cx : & LateContext < ' _ , ' _ > , visited_trait : & Item , trait_items : & [ TraitItemRef ] ) {
121121 fn is_named_self ( cx : & LateContext < ' _ , ' _ > , item : & TraitItemRef , name : & str ) -> bool {
122122 item. ident . name . as_str ( ) == name
123- && if let AssociatedItemKind :: Method { has_self } = item. kind {
123+ && if let AssocItemKind :: Method { has_self } = item. kind {
124124 has_self && {
125125 let did = cx. tcx . hir ( ) . local_def_id_from_hir_id ( item. id . hir_id ) ;
126126 cx. tcx . fn_sig ( did) . inputs ( ) . skip_binder ( ) . len ( ) == 1
@@ -148,7 +148,7 @@ fn check_trait_items(cx: &LateContext<'_, '_>, visited_trait: &Item, trait_items
148148 . iter ( )
149149 . flat_map ( |& i| cx. tcx . associated_items ( i) )
150150 . any ( |i| {
151- i. kind == ty:: AssociatedKind :: Method
151+ i. kind == ty:: AssocKind :: Method
152152 && i. method_has_self_argument
153153 && i. ident . name == sym ! ( is_empty)
154154 && cx. tcx . fn_sig ( i. def_id ) . inputs ( ) . skip_binder ( ) . len ( ) == 1
@@ -171,7 +171,7 @@ fn check_trait_items(cx: &LateContext<'_, '_>, visited_trait: &Item, trait_items
171171fn check_impl_items ( cx : & LateContext < ' _ , ' _ > , item : & Item , impl_items : & [ ImplItemRef ] ) {
172172 fn is_named_self ( cx : & LateContext < ' _ , ' _ > , item : & ImplItemRef , name : & str ) -> bool {
173173 item. ident . name . as_str ( ) == name
174- && if let AssociatedItemKind :: Method { has_self } = item. kind {
174+ && if let AssocItemKind :: Method { has_self } = item. kind {
175175 has_self && {
176176 let did = cx. tcx . hir ( ) . local_def_id_from_hir_id ( item. id . hir_id ) ;
177177 cx. tcx . fn_sig ( did) . inputs ( ) . skip_binder ( ) . len ( ) == 1
@@ -258,9 +258,9 @@ fn check_len(
258258
259259/// Checks if this type has an `is_empty` method.
260260fn has_is_empty ( cx : & LateContext < ' _ , ' _ > , expr : & Expr ) -> bool {
261- /// Gets an `AssociatedItem ` and return true if it matches `is_empty(self)`.
262- fn is_is_empty ( cx : & LateContext < ' _ , ' _ > , item : & ty:: AssociatedItem ) -> bool {
263- if let ty:: AssociatedKind :: Method = item. kind {
261+ /// Gets an `AssocItem ` and return true if it matches `is_empty(self)`.
262+ fn is_is_empty ( cx : & LateContext < ' _ , ' _ > , item : & ty:: AssocItem ) -> bool {
263+ if let ty:: AssocKind :: Method = item. kind {
264264 if item. ident . name . as_str ( ) == "is_empty" {
265265 let sig = cx. tcx . fn_sig ( item. def_id ) ;
266266 let ty = sig. skip_binder ( ) ;
0 commit comments