@@ -589,7 +589,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
589
589
// if they are both "path types", there's a chance of ambiguity
590
590
// due to different versions of the same crate
591
591
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 )
593
593
{
594
594
report_path_match ( err, exp_adt. did , found_adt. did ) ;
595
595
}
@@ -803,7 +803,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
803
803
self . highlight_outer ( & mut t1_out, & mut t2_out, path, sub, i, & other_ty) ;
804
804
return Some ( ( ) ) ;
805
805
}
806
- if let & ty:: Adt ( def, _) = & ta. sty {
806
+ if let & ty:: Adt ( def, _) = & ta. kind {
807
807
let path_ = self . tcx . def_path_str ( def. did . clone ( ) ) ;
808
808
if path_ == other_path {
809
809
self . highlight_outer ( & mut t1_out, & mut t2_out, path, sub, i, & other_ty) ;
@@ -868,7 +868,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
868
868
/// relevant differences, and return two representation of those types for highlighted printing.
869
869
fn cmp ( & self , t1 : Ty < ' tcx > , t2 : Ty < ' tcx > ) -> ( DiagnosticStyledString , DiagnosticStyledString ) {
870
870
fn equals < ' tcx > ( a : Ty < ' tcx > , b : Ty < ' tcx > ) -> bool {
871
- match ( & a. sty , & b. sty ) {
871
+ match ( & a. kind , & b. kind ) {
872
872
( a, b) if * a == * b => true ,
873
873
( & ty:: Int ( _) , & ty:: Infer ( ty:: InferTy :: IntVar ( _) ) )
874
874
| ( & ty:: Infer ( ty:: InferTy :: IntVar ( _) ) , & ty:: Int ( _) )
@@ -902,7 +902,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
902
902
s. push_normal ( ty. to_string ( ) ) ;
903
903
}
904
904
905
- match ( & t1. sty , & t2. sty ) {
905
+ match ( & t1. kind , & t2. kind ) {
906
906
( & ty:: Adt ( def1, sub1) , & ty:: Adt ( def2, sub2) ) => {
907
907
let sub_no_defaults_1 = self . strip_generic_default_params ( def1. did , sub1) ;
908
908
let sub_no_defaults_2 = self . strip_generic_default_params ( def2. did , sub2) ;
@@ -1138,7 +1138,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
1138
1138
match ( terr, is_simple_error, expected == found) {
1139
1139
( & TypeError :: Sorts ( ref values) , false , true ) => {
1140
1140
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 {
1142
1142
format ! ( " (opaque type at {})" , self . tcx. sess. source_map( )
1143
1143
. mk_substr_filename( self . tcx. def_span( def_id) ) )
1144
1144
} else {
@@ -1179,9 +1179,9 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
1179
1179
exp_found : & ty:: error:: ExpectedFound < Ty < ' tcx > > ,
1180
1180
diag : & mut DiagnosticBuilder < ' tcx > ,
1181
1181
) {
1182
- match ( & exp_found. expected . sty , & exp_found. found . sty ) {
1182
+ match ( & exp_found. expected . kind , & exp_found. found . kind ) {
1183
1183
( 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 {
1185
1185
let path_str = format ! ( "{:?}" , exp_def) ;
1186
1186
if exp_def == & found_def {
1187
1187
let opt_msg = "you can convert from `&Option<T>` to `Option<&T>` using \
@@ -1203,9 +1203,9 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
1203
1203
{
1204
1204
let mut show_suggestion = true ;
1205
1205
for ( exp_ty, found_ty) in exp_substs. types ( ) . zip ( found_substs. types ( ) ) {
1206
- match exp_ty. sty {
1206
+ match exp_ty. kind {
1207
1207
ty:: Ref ( _, exp_ty, _) => {
1208
- match ( & exp_ty. sty , & found_ty. sty ) {
1208
+ match ( & exp_ty. kind , & found_ty. kind ) {
1209
1209
( _, ty:: Param ( _) ) |
1210
1210
( _, ty:: Infer ( _) ) |
1211
1211
( ty:: Param ( _) , _) |
0 commit comments