@@ -589,7 +589,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
589589                // if they are both "path types", there's a chance of ambiguity 
590590                // due to different versions of the same crate 
591591                if  let  ( & ty:: Adt ( exp_adt,  _) ,  & ty:: Adt ( found_adt,  _) ) 
592-                      = ( & exp_found. expected . sty ,  & exp_found. found . sty ) 
592+                      = ( & exp_found. expected . kind ,  & exp_found. found . kind ) 
593593                { 
594594                    report_path_match ( err,  exp_adt. did ,  found_adt. did ) ; 
595595                } 
@@ -803,7 +803,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
803803                self . highlight_outer ( & mut  t1_out,  & mut  t2_out,  path,  sub,  i,  & other_ty) ; 
804804                return  Some ( ( ) ) ; 
805805            } 
806-             if  let  & ty:: Adt ( def,  _)  = & ta. sty  { 
806+             if  let  & ty:: Adt ( def,  _)  = & ta. kind  { 
807807                let  path_ = self . tcx . def_path_str ( def. did . clone ( ) ) ; 
808808                if  path_ == other_path { 
809809                    self . highlight_outer ( & mut  t1_out,  & mut  t2_out,  path,  sub,  i,  & other_ty) ; 
@@ -868,7 +868,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
868868/// relevant differences, and return two representation of those types for highlighted printing. 
869869fn  cmp ( & self ,  t1 :  Ty < ' tcx > ,  t2 :  Ty < ' tcx > )  -> ( DiagnosticStyledString ,  DiagnosticStyledString )  { 
870870        fn  equals < ' tcx > ( a :  Ty < ' tcx > ,  b :  Ty < ' tcx > )  -> bool  { 
871-             match  ( & a. sty ,  & b. sty )  { 
871+             match  ( & a. kind ,  & b. kind )  { 
872872                ( a,  b)  if  * a == * b => true , 
873873                ( & ty:: Int ( _) ,  & ty:: Infer ( ty:: InferTy :: IntVar ( _) ) ) 
874874                | ( & ty:: Infer ( ty:: InferTy :: IntVar ( _) ) ,  & ty:: Int ( _) ) 
@@ -902,7 +902,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
902902            s. push_normal ( ty. to_string ( ) ) ; 
903903        } 
904904
905-         match  ( & t1. sty ,  & t2. sty )  { 
905+         match  ( & t1. kind ,  & t2. kind )  { 
906906            ( & ty:: Adt ( def1,  sub1) ,  & ty:: Adt ( def2,  sub2) )  => { 
907907                let  sub_no_defaults_1 = self . strip_generic_default_params ( def1. did ,  sub1) ; 
908908                let  sub_no_defaults_2 = self . strip_generic_default_params ( def2. did ,  sub2) ; 
@@ -1138,7 +1138,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
11381138            match  ( terr,  is_simple_error,  expected == found)  { 
11391139                ( & TypeError :: Sorts ( ref  values) ,  false ,  true )  => { 
11401140                    let  sort_string = | a_type :  Ty < ' tcx >  |
1141-                         if  let  ty:: Opaque ( def_id,  _)  = a_type. sty  { 
1141+                         if  let  ty:: Opaque ( def_id,  _)  = a_type. kind  { 
11421142                            format ! ( " (opaque type at {})" ,  self . tcx. sess. source_map( ) 
11431143                                . mk_substr_filename( self . tcx. def_span( def_id) ) ) 
11441144                        }  else  { 
@@ -1179,9 +1179,9 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
11791179        exp_found :  & ty:: error:: ExpectedFound < Ty < ' tcx > > , 
11801180        diag :  & mut  DiagnosticBuilder < ' tcx > , 
11811181    )  { 
1182-         match  ( & exp_found. expected . sty ,  & exp_found. found . sty )  { 
1182+         match  ( & exp_found. expected . kind ,  & exp_found. found . kind )  { 
11831183            ( ty:: Adt ( exp_def,  exp_substs) ,  ty:: Ref ( _,  found_ty,  _) )  => { 
1184-                 if  let  ty:: Adt ( found_def,  found_substs)  = found_ty. sty  { 
1184+                 if  let  ty:: Adt ( found_def,  found_substs)  = found_ty. kind  { 
11851185                    let  path_str = format ! ( "{:?}" ,  exp_def) ; 
11861186                    if  exp_def == & found_def { 
11871187                        let  opt_msg = "you can convert from `&Option<T>` to `Option<&T>` using \  
@@ -1203,9 +1203,9 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
12031203                        { 
12041204                            let  mut  show_suggestion = true ; 
12051205                            for  ( exp_ty,  found_ty)  in  exp_substs. types ( ) . zip ( found_substs. types ( ) )  { 
1206-                                 match  exp_ty. sty  { 
1206+                                 match  exp_ty. kind  { 
12071207                                    ty:: Ref ( _,  exp_ty,  _)  => { 
1208-                                         match  ( & exp_ty. sty ,  & found_ty. sty )  { 
1208+                                         match  ( & exp_ty. kind ,  & found_ty. kind )  { 
12091209                                            ( _,  ty:: Param ( _) )  |
12101210                                            ( _,  ty:: Infer ( _) )  |
12111211                                            ( ty:: Param ( _) ,  _)  |
0 commit comments