@@ -8,7 +8,7 @@ use hir::ItemKind;
8
8
use rustc_errors:: Applicability ;
9
9
use rustc_hir as hir;
10
10
use rustc_infer:: infer:: type_variable:: { TypeVariableOrigin , TypeVariableOriginKind } ;
11
- use rustc_middle:: ty:: { Adt , Array , Ref , Ty } ;
11
+ use rustc_middle:: ty:: { self , Ty } ;
12
12
use rustc_session:: lint:: builtin:: RUST_2021_PRELUDE_COLLISIONS ;
13
13
use rustc_span:: symbol:: kw:: { Empty , Underscore } ;
14
14
use rustc_span:: symbol:: { sym, Ident } ;
@@ -44,7 +44,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
44
44
// but `[T; N].into_iter()` doesn't resolve to IntoIterator::into_iter
45
45
// before Rust 2021, which results in the same problem.
46
46
// 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 ( ) => {
48
48
// In this case, it wasn't really a prelude addition that was the problem.
49
49
// Instead, the problem is that the array-into_iter hack will no longer apply in Rust 2021.
50
50
rustc_lint:: ARRAY_INTO_ITER
@@ -64,7 +64,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
64
64
pick. autoref_or_ptr_adjustment,
65
65
Some ( probe:: AutorefOrPtrAdjustment :: Autoref { .. } )
66
66
)
67
- && matches ! ( self_ty. kind( ) , Ref ( ..) )
67
+ && matches ! ( self_ty. kind( ) , ty :: Ref ( ..) )
68
68
{
69
69
return ;
70
70
}
@@ -280,7 +280,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
280
280
// the user has written the self type with generics already which we (naively) do by looking
281
281
// for a "<" in `self_ty_name`.
282
282
if !self_ty_name. contains ( '<' ) {
283
- if let Adt ( def, _) = self_ty. kind ( ) {
283
+ if let ty :: Adt ( def, _) = self_ty. kind ( ) {
284
284
let generics = self . tcx . generics_of ( def. did ( ) ) ;
285
285
if !generics. params . is_empty ( ) {
286
286
let counts = generics. own_counts ( ) ;
0 commit comments