diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-11-23 20:36:59 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-11-23 21:32:33 +0000 |
| commit | 543e559c5300e8bd3be6d491897eaac327f9dc71 (patch) | |
| tree | 13d25082a3d9acbcbcc816c6f50ee058215dfdf9 | |
| parent | 988fccb45dfab26d97ecb57bfdfda5be4656bc6b (diff) | |
| download | rust-543e559c5300e8bd3be6d491897eaac327f9dc71.tar.gz rust-543e559c5300e8bd3be6d491897eaac327f9dc71.zip | |
Fix assertion
| -rw-r--r-- | compiler/rustc_ty_utils/src/abi.rs | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/compiler/rustc_ty_utils/src/abi.rs b/compiler/rustc_ty_utils/src/abi.rs index ae368464256..85e137d29ac 100644 --- a/compiler/rustc_ty_utils/src/abi.rs +++ b/compiler/rustc_ty_utils/src/abi.rs @@ -165,19 +165,7 @@ fn fn_sig_for_fn_abi<'tcx>( let ret_ty = Ty::new_adt(tcx, option_adt_ref, option_args); assert_eq!(sig.return_ty, tcx.types.unit); - - // We have to replace the `ResumeTy` that is used for type and borrow checking - // with `()` which is used in codegen. - #[cfg(debug_assertions)] - { - if let ty::Adt(resume_ty_adt, _) = sig.resume_ty.kind() { - let expected_adt = - tcx.adt_def(tcx.require_lang_item(LangItem::ResumeTy, None)); - assert_eq!(*resume_ty_adt, expected_adt); - } else { - panic!("expected `ResumeTy`, found `{:?}`", sig.resume_ty); - }; - } + assert_eq!(sig.resume_ty, tcx.types.unit); (None, ret_ty) } |
