@@ -56,7 +56,7 @@ use crate::hir::Node;
5656use crate :: middle:: region;
5757use crate :: traits:: { ObligationCause , ObligationCauseCode } ;
5858use crate :: ty:: error:: TypeError ;
59- use crate :: ty:: { self , subst:: { Subst , SubstsRef } , Region , Ty , TyCtxt , TyKind , TypeFoldable } ;
59+ use crate :: ty:: { self , subst:: { Subst , SubstsRef } , Region , Ty , TyCtxt , TypeFoldable } ;
6060use errors:: { Applicability , DiagnosticBuilder , DiagnosticStyledString } ;
6161use std:: { cmp, fmt} ;
6262use syntax_pos:: { Pos , Span } ;
@@ -1094,14 +1094,14 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
10941094 ( _, false , _) => {
10951095 if let Some ( exp_found) = exp_found {
10961096 let ( def_id, ret_ty) = match exp_found. found . sty {
1097- TyKind :: FnDef ( def, _) => {
1097+ ty :: FnDef ( def, _) => {
10981098 ( Some ( def) , Some ( self . tcx . fn_sig ( def) . output ( ) ) )
10991099 }
11001100 _ => ( None , None ) ,
11011101 } ;
11021102
11031103 let exp_is_struct = match exp_found. expected . sty {
1104- TyKind :: Adt ( def, _) => def. is_struct ( ) ,
1104+ ty :: Adt ( def, _) => def. is_struct ( ) ,
11051105 _ => false ,
11061106 } ;
11071107
@@ -1140,8 +1140,8 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
11401140 diag : & mut DiagnosticBuilder < ' tcx > ,
11411141 ) {
11421142 match ( & exp_found. expected . sty , & exp_found. found . sty ) {
1143- ( TyKind :: Adt ( exp_def, exp_substs) , TyKind :: Ref ( _, found_ty, _) ) => {
1144- if let TyKind :: Adt ( found_def, found_substs) = found_ty. sty {
1143+ ( ty :: Adt ( exp_def, exp_substs) , ty :: Ref ( _, found_ty, _) ) => {
1144+ if let ty :: Adt ( found_def, found_substs) = found_ty. sty {
11451145 let path_str = format ! ( "{:?}" , exp_def) ;
11461146 if exp_def == & found_def {
11471147 let opt_msg = "you can convert from `&Option<T>` to `Option<&T>` using \
@@ -1164,17 +1164,17 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
11641164 let mut show_suggestion = true ;
11651165 for ( exp_ty, found_ty) in exp_substs. types ( ) . zip ( found_substs. types ( ) ) {
11661166 match exp_ty. sty {
1167- TyKind :: Ref ( _, exp_ty, _) => {
1167+ ty :: Ref ( _, exp_ty, _) => {
11681168 match ( & exp_ty. sty , & found_ty. sty ) {
1169- ( _, TyKind :: Param ( _) ) |
1170- ( _, TyKind :: Infer ( _) ) |
1171- ( TyKind :: Param ( _) , _) |
1172- ( TyKind :: Infer ( _) , _) => { }
1169+ ( _, ty :: Param ( _) ) |
1170+ ( _, ty :: Infer ( _) ) |
1171+ ( ty :: Param ( _) , _) |
1172+ ( ty :: Infer ( _) , _) => { }
11731173 _ if ty:: TyS :: same_type ( exp_ty, found_ty) => { }
11741174 _ => show_suggestion = false ,
11751175 } ;
11761176 }
1177- TyKind :: Param ( _) | TyKind :: Infer ( _) => { }
1177+ ty :: Param ( _) | ty :: Infer ( _) => { }
11781178 _ => show_suggestion = false ,
11791179 }
11801180 }
0 commit comments