@@ -8,7 +8,7 @@ use hir::ItemKind;
88use rustc_errors:: Applicability ;
99use rustc_hir as hir;
1010use rustc_infer:: infer:: type_variable:: { TypeVariableOrigin , TypeVariableOriginKind } ;
11- use rustc_middle:: ty:: { Adt , Array , Ref , Ty } ;
11+ use rustc_middle:: ty:: { self , Ty } ;
1212use rustc_session:: lint:: builtin:: RUST_2021_PRELUDE_COLLISIONS ;
1313use rustc_span:: symbol:: kw:: { Empty , Underscore } ;
1414use rustc_span:: symbol:: { sym, Ident } ;
@@ -44,7 +44,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
4444 // but `[T; N].into_iter()` doesn't resolve to IntoIterator::into_iter
4545 // before Rust 2021, which results in the same problem.
4646 // It is only a problem for arrays.
47- sym:: into_iter if let Array ( ..) = self_ty. kind ( ) => {
47+ sym:: into_iter if let ty :: Array ( ..) = self_ty. kind ( ) => {
4848 // In this case, it wasn't really a prelude addition that was the problem.
4949 // Instead, the problem is that the array-into_iter hack will no longer apply in Rust 2021.
5050 rustc_lint:: ARRAY_INTO_ITER
@@ -64,7 +64,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
6464 pick. autoref_or_ptr_adjustment,
6565 Some ( probe:: AutorefOrPtrAdjustment :: Autoref { .. } )
6666 )
67- && matches ! ( self_ty. kind( ) , Ref ( ..) )
67+ && matches ! ( self_ty. kind( ) , ty :: Ref ( ..) )
6868 {
6969 return ;
7070 }
@@ -280,7 +280,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
280280 // the user has written the self type with generics already which we (naively) do by looking
281281 // for a "<" in `self_ty_name`.
282282 if !self_ty_name. contains ( '<' ) {
283- if let Adt ( def, _) = self_ty. kind ( ) {
283+ if let ty :: Adt ( def, _) = self_ty. kind ( ) {
284284 let generics = self . tcx . generics_of ( def. did ( ) ) ;
285285 if !generics. params . is_empty ( ) {
286286 let counts = generics. own_counts ( ) ;
0 commit comments