@@ -9,7 +9,7 @@ use rustc_hir::{
99} ;
1010use rustc_lint:: { LateContext , LateLintPass } ;
1111use rustc_middle:: ty:: adjustment:: { Adjust , PointerCoercion } ;
12- use rustc_middle:: ty:: { self , Adt , AdtDef , GenericArgsRef , Ty , TypeckResults } ;
12+ use rustc_middle:: ty:: { self , AdtDef , GenericArgsRef , Ty , TypeckResults } ;
1313use rustc_session:: impl_lint_pass;
1414use rustc_span:: sym;
1515
@@ -79,7 +79,7 @@ fn is_path_self(e: &Expr<'_>) -> bool {
7979fn contains_trait_object ( ty : Ty < ' _ > ) -> bool {
8080 match ty. kind ( ) {
8181 ty:: Ref ( _, ty, _) => contains_trait_object ( * ty) ,
82- Adt ( def, args) => def. is_box ( ) && args[ 0 ] . as_type ( ) . map_or ( false , contains_trait_object) ,
82+ ty :: Adt ( def, args) => def. is_box ( ) && args[ 0 ] . as_type ( ) . map_or ( false , contains_trait_object) ,
8383 ty:: Dynamic ( ..) => true ,
8484 _ => false ,
8585 }
@@ -198,7 +198,7 @@ impl<'tcx> LateLintPass<'tcx> for DerivableImpls {
198198 && let Node :: ImplItem ( impl_item) = cx. tcx . hir_node ( impl_item_hir)
199199 && let ImplItemKind :: Fn ( _, b) = & impl_item. kind
200200 && let Body { value : func_expr, .. } = cx. tcx . hir ( ) . body ( * b)
201- && let & Adt ( adt_def, args) = cx. tcx . type_of ( item. owner_id ) . instantiate_identity ( ) . kind ( )
201+ && let & ty :: Adt ( adt_def, args) = cx. tcx . type_of ( item. owner_id ) . instantiate_identity ( ) . kind ( )
202202 && let attrs = cx. tcx . hir ( ) . attrs ( item. hir_id ( ) )
203203 && !attrs. iter ( ) . any ( |attr| attr. doc_str ( ) . is_some ( ) )
204204 && cx. tcx . hir ( ) . attrs ( impl_item_hir) . is_empty ( )
0 commit comments