diff --git a/0001-Fix-Async-Generator-ABI.patch b/0001-Fix-Async-Generator-ABI.patch deleted file mode 100644 index 34dd1bcedd865eedd9cdddd07d4615bce53162f4..0000000000000000000000000000000000000000 --- a/0001-Fix-Async-Generator-ABI.patch +++ /dev/null @@ -1,55 +0,0 @@ -From ecf812777a260e35ec9cd0c7d9dbd17a3f5cf5f9 Mon Sep 17 00:00:00 2001 -From: Arpad Borsos -Date: Tue, 29 Nov 2022 23:17:08 +0100 -Subject: [PATCH] Fix Async Generator ABI - -This change was missed when making async generators implement `Future` directly. -It did not cause any problems in codegen so far, as `GeneratorState<(), Output>` -happens to have the same ABI as `Poll`. ---- - compiler/rustc_ty_utils/src/abi.rs | 22 +++++++++++++++++----- - 1 file changed, 17 insertions(+), 5 deletions(-) - -diff --git a/compiler/rustc_ty_utils/src/abi.rs b/compiler/rustc_ty_utils/src/abi.rs -index 73c7eb6992f0..d644cbccea11 100644 ---- a/compiler/rustc_ty_utils/src/abi.rs -+++ b/compiler/rustc_ty_utils/src/abi.rs -@@ -85,7 +85,7 @@ fn fn_sig_for_fn_abi<'tcx>( - bound_vars, - ) - } -- ty::Generator(_, substs, _) => { -+ ty::Generator(did, substs, _) => { - let sig = substs.as_generator().poly_sig(); - - let bound_vars = tcx.mk_bound_variable_kinds( -@@ -104,10 +104,22 @@ fn fn_sig_for_fn_abi<'tcx>( - let env_ty = tcx.mk_adt(pin_adt_ref, pin_substs); - - let sig = sig.skip_binder(); -- let state_did = tcx.require_lang_item(LangItem::GeneratorState, None); -- let state_adt_ref = tcx.adt_def(state_did); -- let state_substs = tcx.intern_substs(&[sig.yield_ty.into(), sig.return_ty.into()]); -- let ret_ty = tcx.mk_adt(state_adt_ref, state_substs); -+ // The `FnSig` and the `ret_ty` here is for a generators main -+ // `Generator::resume(...) -> GeneratorState` function in case we -+ // have an ordinary generator, or the `Future::poll(...) -> Poll` -+ // function in case this is a special generator backing an async construct. -+ let ret_ty = if tcx.generator_is_async(did) { -+ let state_did = tcx.require_lang_item(LangItem::Poll, None); -+ let state_adt_ref = tcx.adt_def(state_did); -+ let state_substs = tcx.intern_substs(&[sig.return_ty.into()]); -+ tcx.mk_adt(state_adt_ref, state_substs) -+ } else { -+ let state_did = tcx.require_lang_item(LangItem::GeneratorState, None); -+ let state_adt_ref = tcx.adt_def(state_did); -+ let state_substs = tcx.intern_substs(&[sig.yield_ty.into(), sig.return_ty.into()]); -+ tcx.mk_adt(state_adt_ref, state_substs) -+ }; -+ - ty::Binder::bind_with_vars( - tcx.mk_fn_sig( - [env_ty, sig.resume_ty].iter(), --- -2.39.1 - diff --git a/rust.spec b/rust.spec index 1b67d1652eb691bc3a726aa198cf31f707614e5d..b1de7a6fa6d46aeb3d8d679d6169da0623368516 100644 --- a/rust.spec +++ b/rust.spec @@ -1,7 +1,7 @@ -%global bootstrap_rust 1.66.0 -%global bootstrap_cargo 1.66.0 -%global bootstrap_channel 1.66.0 -%global bootstrap_date 2022-12-15 +%global bootstrap_rust 1.67.1 +%global bootstrap_cargo 1.67.1 +%global bootstrap_channel 1.67.1 +%global bootstrap_date 2023-02-09 %bcond_with llvm_static %bcond_with bundled_llvm %bcond_without bundled_libgit2 @@ -9,7 +9,7 @@ %bcond_without curl_http2 %bcond_without lldb Name: rust -Version: 1.67.1 +Version: 1.68.0 Release: 1 Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and MIT) @@ -26,8 +26,6 @@ Patch0005: compile-with-llvm-15.patch Patch0006: 0001-Use-lld-provided-by-system-for-wasm.patch # Set a substitute-path in rust-gdb for standard library sources. Patch0007: rustc-1.61.0-rust-gdb-substitute-path.patch -# https://github.com/rust-lang/rust/pull/105082 -Patch0008: 0001-Fix-Async-Generator-ABI.patch %{lua: function rust_triple(arch) local abi = "gnu" @@ -249,7 +247,6 @@ sed -i.try-python -e '/^try python3 /i try "%{python}" "$@"' ./configure %patch0005 -p1 %patch0006 -p1 %patch0007 -p1 -%patch0008 -p1 rm -rf vendor/curl-sys/curl/ rm -rf vendor/jemalloc-sys/jemalloc/ rm -rf vendor/libssh2-sys/libssh2/ @@ -463,6 +460,9 @@ export %{rust_env} %{_mandir}/man1/cargo*.1* %changelog +* Wed Mar 22 2023 wangkai - 1.68.0-1 +- Update to 1.68.0 + * Tue Feb 28 2023 wangkai - 1.67.1-1 - Update to 1.67.1 diff --git a/rustc-1.67.1-src.tar.gz b/rustc-1.68.0-src.tar.gz similarity index 88% rename from rustc-1.67.1-src.tar.gz rename to rustc-1.68.0-src.tar.gz index 6bc9e014161df37d5e8f732b6760a5c8bcf84743..9ff9e3f4a9dd6e71c1b0d3ab7b51369f157303f1 100644 Binary files a/rustc-1.67.1-src.tar.gz and b/rustc-1.68.0-src.tar.gz differ