@@ -9,7 +9,7 @@ use rustc_hir::{
9
9
} ;
10
10
use rustc_lint:: { LateContext , LateLintPass } ;
11
11
use 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 } ;
13
13
use rustc_session:: impl_lint_pass;
14
14
use rustc_span:: sym;
15
15
@@ -79,7 +79,7 @@ fn is_path_self(e: &Expr<'_>) -> bool {
79
79
fn contains_trait_object ( ty : Ty < ' _ > ) -> bool {
80
80
match ty. kind ( ) {
81
81
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) ,
83
83
ty:: Dynamic ( ..) => true ,
84
84
_ => false ,
85
85
}
@@ -198,7 +198,7 @@ impl<'tcx> LateLintPass<'tcx> for DerivableImpls {
198
198
&& let Node :: ImplItem ( impl_item) = cx. tcx . hir_node ( impl_item_hir)
199
199
&& let ImplItemKind :: Fn ( _, b) = & impl_item. kind
200
200
&& 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 ( )
202
202
&& let attrs = cx. tcx . hir ( ) . attrs ( item. hir_id ( ) )
203
203
&& !attrs. iter ( ) . any ( |attr| attr. doc_str ( ) . is_some ( ) )
204
204
&& cx. tcx . hir ( ) . attrs ( impl_item_hir) . is_empty ( )
0 commit comments