@@ -132,7 +132,7 @@ fn find_return_type<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx ExprKind<'_>) -> O
132
132
/// Extracts the error type from Result<T, E>.
133
133
fn result_error_type < ' tcx > ( cx : & LateContext < ' tcx > , ty : Ty < ' tcx > ) -> Option < Ty < ' tcx > > {
134
134
if_chain ! {
135
- if let ty:: Adt ( _, subst) = ty. kind;
135
+ if let ty:: Adt ( _, subst) = ty. kind( ) ;
136
136
if is_type_diagnostic_item( cx, ty, sym!( result_type) ) ;
137
137
let err_ty = subst. type_at( 1 ) ;
138
138
then {
@@ -146,11 +146,11 @@ fn result_error_type<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> Option<Ty<'t
146
146
/// Extracts the error type from Poll<Result<T, E>>.
147
147
fn poll_result_error_type < ' tcx > ( cx : & LateContext < ' tcx > , ty : Ty < ' tcx > ) -> Option < Ty < ' tcx > > {
148
148
if_chain ! {
149
- if let ty:: Adt ( def, subst) = ty. kind;
149
+ if let ty:: Adt ( def, subst) = ty. kind( ) ;
150
150
if match_def_path( cx, def. did, & paths:: POLL ) ;
151
151
let ready_ty = subst. type_at( 0 ) ;
152
152
153
- if let ty:: Adt ( ready_def, ready_subst) = ready_ty. kind;
153
+ if let ty:: Adt ( ready_def, ready_subst) = ready_ty. kind( ) ;
154
154
if cx. tcx. is_diagnostic_item( sym!( result_type) , ready_def. did) ;
155
155
let err_ty = ready_subst. type_at( 1 ) ;
156
156
@@ -165,15 +165,15 @@ fn poll_result_error_type<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> Option<
165
165
/// Extracts the error type from Poll<Option<Result<T, E>>>.
166
166
fn poll_option_result_error_type < ' tcx > ( cx : & LateContext < ' tcx > , ty : Ty < ' tcx > ) -> Option < Ty < ' tcx > > {
167
167
if_chain ! {
168
- if let ty:: Adt ( def, subst) = ty. kind;
168
+ if let ty:: Adt ( def, subst) = ty. kind( ) ;
169
169
if match_def_path( cx, def. did, & paths:: POLL ) ;
170
170
let ready_ty = subst. type_at( 0 ) ;
171
171
172
- if let ty:: Adt ( ready_def, ready_subst) = ready_ty. kind;
172
+ if let ty:: Adt ( ready_def, ready_subst) = ready_ty. kind( ) ;
173
173
if cx. tcx. is_diagnostic_item( sym!( option_type) , ready_def. did) ;
174
174
let some_ty = ready_subst. type_at( 0 ) ;
175
175
176
- if let ty:: Adt ( some_def, some_subst) = some_ty. kind;
176
+ if let ty:: Adt ( some_def, some_subst) = some_ty. kind( ) ;
177
177
if cx. tcx. is_diagnostic_item( sym!( result_type) , some_def. did) ;
178
178
let err_ty = some_subst. type_at( 1 ) ;
179
179
0 commit comments