File tree Expand file tree Collapse file tree 1 file changed +1
-13
lines changed
compiler/rustc_ty_utils/src Expand file tree Collapse file tree 1 file changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -165,19 +165,7 @@ fn fn_sig_for_fn_abi<'tcx>(
165
165
let ret_ty = Ty :: new_adt ( tcx, option_adt_ref, option_args) ;
166
166
167
167
assert_eq ! ( sig. return_ty, tcx. types. unit) ;
168
-
169
- // We have to replace the `ResumeTy` that is used for type and borrow checking
170
- // with `()` which is used in codegen.
171
- #[ cfg( debug_assertions) ]
172
- {
173
- if let ty:: Adt ( resume_ty_adt, _) = sig. resume_ty . kind ( ) {
174
- let expected_adt =
175
- tcx. adt_def ( tcx. require_lang_item ( LangItem :: ResumeTy , None ) ) ;
176
- assert_eq ! ( * resume_ty_adt, expected_adt) ;
177
- } else {
178
- panic ! ( "expected `ResumeTy`, found `{:?}`" , sig. resume_ty) ;
179
- } ;
180
- }
168
+ assert_eq ! ( sig. resume_ty, tcx. types. unit) ;
181
169
182
170
( None , ret_ty)
183
171
}
You can’t perform that action at this time.
0 commit comments