We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e5b0f5 commit f711dd8Copy full SHA for f711dd8
compiler/rustc_ty_utils/src/abi.rs
@@ -165,19 +165,7 @@ fn fn_sig_for_fn_abi<'tcx>(
165
let ret_ty = Ty::new_adt(tcx, option_adt_ref, option_args);
166
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
- }
+ assert_eq!(sig.resume_ty, tcx.types.unit);
181
182
(None, ret_ty)
183
}
0 commit comments