Skip to content

Commit f711dd8

Browse files
committed
Fix assertion
1 parent 3e5b0f5 commit f711dd8

File tree

1 file changed

+1
-13
lines changed
  • compiler/rustc_ty_utils/src

1 file changed

+1
-13
lines changed

compiler/rustc_ty_utils/src/abi.rs

+1-13
Original file line numberDiff line numberDiff line change
@@ -165,19 +165,7 @@ fn fn_sig_for_fn_abi<'tcx>(
165165
let ret_ty = Ty::new_adt(tcx, option_adt_ref, option_args);
166166

167167
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);
181169

182170
(None, ret_ty)
183171
}

0 commit comments

Comments
 (0)