guix_mirror_bot pushed a commit to branch rust-team
in repository guix.

commit be736ac70fd58e1cfec70b1c69b187fac94a3bc6
Author: Efraim Flashner <[email protected]>
AuthorDate: Thu Nov 5 11:14:03 2026 +0200

    gnu: Remove unused rust versions.
    
    * gnu/packages/rust.scm (rust-1.55, rust-1.56, rust-1.57, rust-1.58,
    rust-1.59, rust-1.60, rust-1.61, rust-1.62, rust-1.63, rust-1.64,
    rust-1.65, rust-1.66, rust-1.67, rust-1.68, rust-1.69, rust-1.70,
    rust-1.71, rust-1.72, rust-1.73, rust-1.74, rust-1.75, rust-1.76,
    rust-1.77, rust-1.78, rust-1.79, rust-1.80, rust-1.81, rust-1.82,
    rust-1.83, rust-1.84, rust-1.85, rust-1.86, rust-1.87, rust-1.88,
    rust-1.89, rust-1.90): Remove variables.
    * gnu/packages/patches/rust-1.64-fix-riscv64-bootstrap.patch,
    gnu/packages/patches/rust-1.78-unwinding-fix.patch,
    gnu/packages/patches/rust-1.81-fix-riscv64-bootstrap.patch: Remove files.
---
 .../patches/rust-1.64-fix-riscv64-bootstrap.patch  |  565 ----------
 gnu/packages/patches/rust-1.78-unwinding-fix.patch |   29 -
 .../patches/rust-1.81-fix-riscv64-bootstrap.patch  |   40 -
 gnu/packages/rust.scm                              | 1079 --------------------
 4 files changed, 1713 deletions(-)

diff --git a/gnu/packages/patches/rust-1.64-fix-riscv64-bootstrap.patch 
b/gnu/packages/patches/rust-1.64-fix-riscv64-bootstrap.patch
deleted file mode 100644
index 4567f812243..00000000000
--- a/gnu/packages/patches/rust-1.64-fix-riscv64-bootstrap.patch
+++ /dev/null
@@ -1,565 +0,0 @@
-https://github.com/rust-lang/rust/commit/263edd43c5255084292329423c61a9d69715ebfa.patch
-https://github.com/rust-lang/rust/issues/102155
-Issue seen on native builds on riscv64 across multiple Linux
-Distributions. An alternative workaround appears to be building stage 1
-with debug enabled.
-
-From 27412d1e3e128349bc515c16ce882860e20f037d Mon Sep 17 00:00:00 2001
-From: 5225225 <[email protected]>
-Date: Thu, 14 Jul 2022 22:42:47 +0100
-Subject: [PATCH] Use constant eval to do strict validity checks
-
----
- Cargo.lock                                    |  1 +
- .../src/intrinsics/mod.rs                     | 15 +----
- compiler/rustc_codegen_ssa/Cargo.toml         |  1 +
- compiler/rustc_codegen_ssa/src/mir/block.rs   |  9 ++-
- .../src/const_eval/machine.rs                 |  2 +-
- .../src/interpret/intrinsics.rs               | 56 ++++++++--------
- compiler/rustc_const_eval/src/lib.rs          |  6 ++
- .../src/might_permit_raw_init.rs              | 40 +++++++++++
- compiler/rustc_middle/src/query/mod.rs        |  8 +++
- compiler/rustc_middle/src/ty/query.rs         |  1 +
- compiler/rustc_query_impl/src/keys.rs         | 12 +++-
- compiler/rustc_target/src/abi/mod.rs          | 38 +++++------
- .../intrinsics/panic-uninitialized-zeroed.rs  | 66 ++++++++++++-------
- 13 files changed, 161 insertions(+), 94 deletions(-)
- create mode 100644 compiler/rustc_const_eval/src/might_permit_raw_init.rs
-
-diff --git a/Cargo.lock b/Cargo.lock
-index 147d47044078a..dd6f0345affd0 100644
---- a/Cargo.lock
-+++ b/Cargo.lock
-@@ -3664,6 +3664,7 @@ dependencies = [
-  "rustc_arena",
-  "rustc_ast",
-  "rustc_attr",
-+ "rustc_const_eval",
-  "rustc_data_structures",
-  "rustc_errors",
-  "rustc_fs_util",
-diff --git a/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs 
b/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs
-index eafae1cdc8af0..4b2207f375879 100644
---- a/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs
-+++ b/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs
-@@ -58,7 +58,6 @@ pub(crate) use llvm::codegen_llvm_intrinsic_call;
- use rustc_middle::ty::print::with_no_trimmed_paths;
- use rustc_middle::ty::subst::SubstsRef;
- use rustc_span::symbol::{kw, sym, Symbol};
--use rustc_target::abi::InitKind;
- 
- use crate::prelude::*;
- use cranelift_codegen::ir::AtomicRmwOp;
-@@ -672,12 +671,7 @@ fn codegen_regular_intrinsic_call<'tcx>(
-                 return;
-             }
- 
--            if intrinsic == sym::assert_zero_valid
--                && !layout.might_permit_raw_init(
--                    fx,
--                    InitKind::Zero,
--                    fx.tcx.sess.opts.unstable_opts.strict_init_checks) {
--
-+            if intrinsic == sym::assert_zero_valid && 
!fx.tcx.permits_zero_init(layout) {
-                 with_no_trimmed_paths!({
-                     crate::base::codegen_panic(
-                         fx,
-@@ -688,12 +682,7 @@ fn codegen_regular_intrinsic_call<'tcx>(
-                 return;
-             }
- 
--            if intrinsic == sym::assert_uninit_valid
--                && !layout.might_permit_raw_init(
--                    fx,
--                    InitKind::Uninit,
--                    fx.tcx.sess.opts.unstable_opts.strict_init_checks) {
--
-+            if intrinsic == sym::assert_uninit_valid && 
!fx.tcx.permits_uninit_init(layout) {
-                 with_no_trimmed_paths!({
-                     crate::base::codegen_panic(
-                         fx,
-diff --git a/compiler/rustc_codegen_ssa/Cargo.toml 
b/compiler/rustc_codegen_ssa/Cargo.toml
-index faabea92f5a6c..81c8b9ceb136e 100644
---- a/compiler/rustc_codegen_ssa/Cargo.toml
-+++ b/compiler/rustc_codegen_ssa/Cargo.toml
-@@ -40,6 +40,7 @@ rustc_metadata = { path = "../rustc_metadata" }
- rustc_query_system = { path = "../rustc_query_system" }
- rustc_target = { path = "../rustc_target" }
- rustc_session = { path = "../rustc_session" }
-+rustc_const_eval = { path = "../rustc_const_eval" }
- 
- [dependencies.object]
- version = "0.29.0"
-diff --git a/compiler/rustc_codegen_ssa/src/mir/block.rs 
b/compiler/rustc_codegen_ssa/src/mir/block.rs
-index 745da821c9d76..773c55cf551d5 100644
---- a/compiler/rustc_codegen_ssa/src/mir/block.rs
-+++ b/compiler/rustc_codegen_ssa/src/mir/block.rs
-@@ -22,7 +22,7 @@ use rustc_span::source_map::Span;
- use rustc_span::{sym, Symbol};
- use rustc_symbol_mangling::typeid_for_fnabi;
- use rustc_target::abi::call::{ArgAbi, FnAbi, PassMode};
--use rustc_target::abi::{self, HasDataLayout, InitKind, WrappingRange};
-+use rustc_target::abi::{self, HasDataLayout, WrappingRange};
- use rustc_target::spec::abi::Abi;
- 
- /// Used by `FunctionCx::codegen_terminator` for emitting common patterns
-@@ -528,7 +528,6 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> 
FunctionCx<'a, 'tcx, Bx> {
-         source_info: mir::SourceInfo,
-         target: Option<mir::BasicBlock>,
-         cleanup: Option<mir::BasicBlock>,
--        strict_validity: bool,
-     ) -> bool {
-         // Emit a panic or a no-op for `assert_*` intrinsics.
-         // These are intrinsics that compile to panics so that we can get a 
message
-@@ -547,12 +546,13 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> 
FunctionCx<'a, 'tcx, Bx> {
-         });
-         if let Some(intrinsic) = panic_intrinsic {
-             use AssertIntrinsic::*;
-+
-             let ty = instance.unwrap().substs.type_at(0);
-             let layout = bx.layout_of(ty);
-             let do_panic = match intrinsic {
-                 Inhabited => layout.abi.is_uninhabited(),
--                ZeroValid => !layout.might_permit_raw_init(bx, 
InitKind::Zero, strict_validity),
--                UninitValid => !layout.might_permit_raw_init(bx, 
InitKind::Uninit, strict_validity),
-+                ZeroValid => !bx.tcx().permits_zero_init(layout),
-+                UninitValid => !bx.tcx().permits_uninit_init(layout),
-             };
-             if do_panic {
-                 let msg_str = with_no_visible_paths!({
-@@ -687,7 +687,6 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> 
FunctionCx<'a, 'tcx, Bx> {
-             source_info,
-             target,
-             cleanup,
--            self.cx.tcx().sess.opts.unstable_opts.strict_init_checks,
-         ) {
-             return;
-         }
-diff --git a/compiler/rustc_const_eval/src/const_eval/machine.rs 
b/compiler/rustc_const_eval/src/const_eval/machine.rs
-index 29ab1d187719c..e00e667fb71e2 100644
---- a/compiler/rustc_const_eval/src/const_eval/machine.rs
-+++ b/compiler/rustc_const_eval/src/const_eval/machine.rs
-@@ -104,7 +104,7 @@ pub struct CompileTimeInterpreter<'mir, 'tcx> {
- }
- 
- impl<'mir, 'tcx> CompileTimeInterpreter<'mir, 'tcx> {
--    pub(super) fn new(const_eval_limit: Limit, can_access_statics: bool) -> 
Self {
-+    pub(crate) fn new(const_eval_limit: Limit, can_access_statics: bool) -> 
Self {
-         CompileTimeInterpreter {
-             steps_remaining: const_eval_limit.0,
-             stack: Vec::new(),
-diff --git a/compiler/rustc_const_eval/src/interpret/intrinsics.rs 
b/compiler/rustc_const_eval/src/interpret/intrinsics.rs
-index e2a8a9891f72f..7827fb8395b7f 100644
---- a/compiler/rustc_const_eval/src/interpret/intrinsics.rs
-+++ b/compiler/rustc_const_eval/src/interpret/intrinsics.rs
-@@ -15,7 +15,7 @@ use rustc_middle::ty::layout::LayoutOf as _;
- use rustc_middle::ty::subst::SubstsRef;
- use rustc_middle::ty::{Ty, TyCtxt};
- use rustc_span::symbol::{sym, Symbol};
--use rustc_target::abi::{Abi, Align, InitKind, Primitive, Size};
-+use rustc_target::abi::{Abi, Align, Primitive, Size};
- 
- use super::{
-     util::ensure_monomorphic_enough, CheckInAllocMsg, ImmTy, InterpCx, 
Machine, OpTy, PlaceTy,
-@@ -413,35 +413,33 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> 
InterpCx<'mir, 'tcx, M> {
-                         ),
-                     )?;
-                 }
--                if intrinsic_name == sym::assert_zero_valid
--                    && !layout.might_permit_raw_init(
--                        self,
--                        InitKind::Zero,
--                        self.tcx.sess.opts.unstable_opts.strict_init_checks,
--                    )
--                {
--                    M::abort(
--                        self,
--                        format!(
--                            "aborted execution: attempted to zero-initialize 
type `{}`, which is invalid",
--                            ty
--                        ),
--                    )?;
-+
-+                if intrinsic_name == sym::assert_zero_valid {
-+                    let should_panic = !self.tcx.permits_zero_init(layout);
-+
-+                    if should_panic {
-+                        M::abort(
-+                            self,
-+                            format!(
-+                                "aborted execution: attempted to 
zero-initialize type `{}`, which is invalid",
-+                                ty
-+                            ),
-+                        )?;
-+                    }
-                 }
--                if intrinsic_name == sym::assert_uninit_valid
--                    && !layout.might_permit_raw_init(
--                        self,
--                        InitKind::Uninit,
--                        self.tcx.sess.opts.unstable_opts.strict_init_checks,
--                    )
--                {
--                    M::abort(
--                        self,
--                        format!(
--                            "aborted execution: attempted to leave type `{}` 
uninitialized, which is invalid",
--                            ty
--                        ),
--                    )?;
-+
-+                if intrinsic_name == sym::assert_uninit_valid {
-+                    let should_panic = !self.tcx.permits_uninit_init(layout);
-+
-+                    if should_panic {
-+                        M::abort(
-+                            self,
-+                            format!(
-+                                "aborted execution: attempted to leave type 
`{}` uninitialized, which is invalid",
-+                                ty
-+                            ),
-+                        )?;
-+                    }
-                 }
-             }
-             sym::simd_insert => {
-diff --git a/compiler/rustc_const_eval/src/lib.rs 
b/compiler/rustc_const_eval/src/lib.rs
-index d65d4f7eb720e..72ac6af685dc4 100644
---- a/compiler/rustc_const_eval/src/lib.rs
-+++ b/compiler/rustc_const_eval/src/lib.rs
-@@ -33,11 +33,13 @@ extern crate rustc_middle;
- pub mod const_eval;
- mod errors;
- pub mod interpret;
-+mod might_permit_raw_init;
- pub mod transform;
- pub mod util;
- 
- use rustc_middle::ty;
- use rustc_middle::ty::query::Providers;
-+use rustc_target::abi::InitKind;
- 
- pub fn provide(providers: &mut Providers) {
-     const_eval::provide(providers);
-@@ -59,4 +61,8 @@ pub fn provide(providers: &mut Providers) {
-         let (param_env, value) = param_env_and_value.into_parts();
-         const_eval::deref_mir_constant(tcx, param_env, value)
-     };
-+    providers.permits_uninit_init =
-+        |tcx, ty| might_permit_raw_init::might_permit_raw_init(tcx, ty, 
InitKind::Uninit);
-+    providers.permits_zero_init =
-+        |tcx, ty| might_permit_raw_init::might_permit_raw_init(tcx, ty, 
InitKind::Zero);
- }
-diff --git a/compiler/rustc_const_eval/src/might_permit_raw_init.rs 
b/compiler/rustc_const_eval/src/might_permit_raw_init.rs
-new file mode 100644
-index 0000000000000..f971c2238c7bb
---- /dev/null
-+++ b/compiler/rustc_const_eval/src/might_permit_raw_init.rs
-@@ -0,0 +1,40 @@
-+use crate::const_eval::CompileTimeInterpreter;
-+use crate::interpret::{InterpCx, MemoryKind, OpTy};
-+use rustc_middle::ty::layout::LayoutCx;
-+use rustc_middle::ty::{layout::TyAndLayout, ParamEnv, TyCtxt};
-+use rustc_session::Limit;
-+use rustc_target::abi::InitKind;
-+
-+pub fn might_permit_raw_init<'tcx>(
-+    tcx: TyCtxt<'tcx>,
-+    ty: TyAndLayout<'tcx>,
-+    kind: InitKind,
-+) -> bool {
-+    let strict = tcx.sess.opts.unstable_opts.strict_init_checks;
-+
-+    if strict {
-+        let machine = CompileTimeInterpreter::new(Limit::new(0), false);
-+
-+        let mut cx = InterpCx::new(tcx, rustc_span::DUMMY_SP, 
ParamEnv::reveal_all(), machine);
-+
-+        let allocated = cx
-+            .allocate(ty, 
MemoryKind::Machine(crate::const_eval::MemoryKind::Heap))
-+            .expect("OOM: failed to allocate for uninit check");
-+
-+        if kind == InitKind::Zero {
-+            cx.write_bytes_ptr(
-+                allocated.ptr,
-+                std::iter::repeat(0_u8).take(ty.layout.size().bytes_usize()),
-+            )
-+            .expect("failed to write bytes for zero valid check");
-+        }
-+
-+        let ot: OpTy<'_, _> = allocated.into();
-+
-+        // Assume that if it failed, it's a validation failure.
-+        cx.validate_operand(&ot).is_ok()
-+    } else {
-+        let layout_cx = LayoutCx { tcx, param_env: ParamEnv::reveal_all() };
-+        ty.might_permit_raw_init(&layout_cx, kind)
-+    }
-+}
-diff --git a/compiler/rustc_middle/src/query/mod.rs 
b/compiler/rustc_middle/src/query/mod.rs
-index bdae7e5fcd6b1..0581ef41f66c2 100644
---- a/compiler/rustc_middle/src/query/mod.rs
-+++ b/compiler/rustc_middle/src/query/mod.rs
-@@ -2053,4 +2053,12 @@ rustc_queries! {
-         desc { |tcx| "looking up generator diagnostic data of `{}`", 
tcx.def_path_str(key) }
-         separate_provide_extern
-     }
-+
-+    query permits_uninit_init(key: TyAndLayout<'tcx>) -> bool {
-+        desc { "checking to see if {:?} permits being left uninit", key.ty }
-+    }
-+
-+    query permits_zero_init(key: TyAndLayout<'tcx>) -> bool {
-+        desc { "checking to see if {:?} permits being left zeroed", key.ty }
-+    }
- }
-diff --git a/compiler/rustc_middle/src/ty/query.rs 
b/compiler/rustc_middle/src/ty/query.rs
-index 3d662ed5de4ba..2452bcf6a61b8 100644
---- a/compiler/rustc_middle/src/ty/query.rs
-+++ b/compiler/rustc_middle/src/ty/query.rs
-@@ -28,6 +28,7 @@ use crate::traits::query::{
- use crate::traits::specialization_graph;
- use crate::traits::{self, ImplSource};
- use crate::ty::fast_reject::SimplifiedType;
-+use crate::ty::layout::TyAndLayout;
- use crate::ty::subst::{GenericArg, SubstsRef};
- use crate::ty::util::AlwaysRequiresDrop;
- use crate::ty::GeneratorDiagnosticData;
-diff --git a/compiler/rustc_query_impl/src/keys.rs 
b/compiler/rustc_query_impl/src/keys.rs
-index 6fbafeb1d32b3..5477431431374 100644
---- a/compiler/rustc_query_impl/src/keys.rs
-+++ b/compiler/rustc_query_impl/src/keys.rs
-@@ -6,7 +6,7 @@ use rustc_middle::mir;
- use rustc_middle::traits;
- use rustc_middle::ty::fast_reject::SimplifiedType;
- use rustc_middle::ty::subst::{GenericArg, SubstsRef};
--use rustc_middle::ty::{self, Ty, TyCtxt};
-+use rustc_middle::ty::{self, layout::TyAndLayout, Ty, TyCtxt};
- use rustc_span::symbol::{Ident, Symbol};
- use rustc_span::{Span, DUMMY_SP};
- 
-@@ -385,6 +385,16 @@ impl<'tcx> Key for Ty<'tcx> {
-     }
- }
- 
-+impl<'tcx> Key for TyAndLayout<'tcx> {
-+    #[inline(always)]
-+    fn query_crate_is_local(&self) -> bool {
-+        true
-+    }
-+    fn default_span(&self, _: TyCtxt<'_>) -> Span {
-+        DUMMY_SP
-+    }
-+}
-+
- impl<'tcx> Key for (Ty<'tcx>, Ty<'tcx>) {
-     #[inline(always)]
-     fn query_crate_is_local(&self) -> bool {
-diff --git a/compiler/rustc_target/src/abi/mod.rs 
b/compiler/rustc_target/src/abi/mod.rs
-index d1eafd6ac5fb8..6f4d073d70486 100644
---- a/compiler/rustc_target/src/abi/mod.rs
-+++ b/compiler/rustc_target/src/abi/mod.rs
-@@ -1372,7 +1372,7 @@ pub struct PointeeInfo {
- 
- /// Used in `might_permit_raw_init` to indicate the kind of initialisation
- /// that is checked to be valid
--#[derive(Copy, Clone, Debug)]
-+#[derive(Copy, Clone, Debug, PartialEq, Eq)]
- pub enum InitKind {
-     Zero,
-     Uninit,
-@@ -1487,14 +1487,18 @@ impl<'a, Ty> TyAndLayout<'a, Ty> {
-     ///
-     /// `init_kind` indicates if the memory is zero-initialized or left 
uninitialized.
-     ///
--    /// `strict` is an opt-in debugging flag added in #97323 that enables 
more checks.
-+    /// This code is intentionally conservative, and will not detect
-+    /// * zero init of an enum whose 0 variant does not allow zero 
initialization
-+    /// * making uninitialized types who have a full valid range (ints, 
floats, raw pointers)
-+    /// * Any form of invalid value being made inside an array (unless the 
value is uninhabited)
-     ///
--    /// This is conservative: in doubt, it will answer `true`.
-+    /// A strict form of these checks that uses const evaluation exists in
-+    /// `rustc_const_eval::might_permit_raw_init`, and a tracking issue for 
making these checks
-+    /// stricter is <https://github.com/rust-lang/rust/issues/66151>.
-     ///
--    /// FIXME: Once we removed all the conservatism, we could alternatively
--    /// create an all-0/all-undef constant and run the const value validator 
to see if
--    /// this is a valid value for the given type.
--    pub fn might_permit_raw_init<C>(self, cx: &C, init_kind: InitKind, 
strict: bool) -> bool
-+    /// FIXME: Once all the conservatism is removed from here, and the checks 
are ran by default,
-+    /// we can use the const evaluation checks always instead.
-+    pub fn might_permit_raw_init<C>(self, cx: &C, init_kind: InitKind) -> bool
-     where
-         Self: Copy,
-         Ty: TyAbiInterface<'a, C>,
-@@ -1507,13 +1511,8 @@ impl<'a, Ty> TyAndLayout<'a, Ty> {
-                     s.valid_range(cx).contains(0)
-                 }
-                 InitKind::Uninit => {
--                    if strict {
--                        // The type must be allowed to be uninit (which means 
"is a union").
--                        s.is_uninit_valid()
--                    } else {
--                        // The range must include all values.
--                        s.is_always_valid(cx)
--                    }
-+                    // The range must include all values.
-+                    s.is_always_valid(cx)
-                 }
-             }
-         };
-@@ -1534,19 +1533,12 @@ impl<'a, Ty> TyAndLayout<'a, Ty> {
-         // If we have not found an error yet, we need to recursively descend 
into fields.
-         match &self.fields {
-             FieldsShape::Primitive | FieldsShape::Union { .. } => {}
--            FieldsShape::Array { count, .. } => {
-+            FieldsShape::Array { .. } => {
-                 // FIXME(#66151): For now, we are conservative and do not 
check arrays by default.
--                if strict
--                    && *count > 0
--                    && !self.field(cx, 0).might_permit_raw_init(cx, 
init_kind, strict)
--                {
--                    // Found non empty array with a type that is unhappy 
about this kind of initialization
--                    return false;
--                }
-             }
-             FieldsShape::Arbitrary { offsets, .. } => {
-                 for idx in 0..offsets.len() {
--                    if !self.field(cx, idx).might_permit_raw_init(cx, 
init_kind, strict) {
-+                    if !self.field(cx, idx).might_permit_raw_init(cx, 
init_kind) {
-                         // We found a field that is unhappy with this kind of 
initialization.
-                         return false;
-                     }
-diff --git a/src/test/ui/intrinsics/panic-uninitialized-zeroed.rs 
b/src/test/ui/intrinsics/panic-uninitialized-zeroed.rs
-index 3ffd35ecdb8da..255151a96032c 100644
---- a/src/test/ui/intrinsics/panic-uninitialized-zeroed.rs
-+++ b/src/test/ui/intrinsics/panic-uninitialized-zeroed.rs
-@@ -57,6 +57,13 @@ enum LR_NonZero {
- 
- struct ZeroSized;
- 
-+#[allow(dead_code)]
-+#[repr(i32)]
-+enum ZeroIsValid {
-+    Zero(u8) = 0,
-+    One(NonNull<()>) = 1,
-+}
-+
- fn test_panic_msg<T>(op: impl (FnOnce() -> T) + panic::UnwindSafe, msg: &str) 
{
-     let err = panic::catch_unwind(op).err();
-     assert_eq!(
-@@ -152,33 +159,12 @@ fn main() {
-             "attempted to zero-initialize type `*const dyn 
core::marker::Send`, which is invalid"
-         );
- 
--        /* FIXME(#66151) we conservatively do not error here yet.
--        test_panic_msg(
--            || mem::uninitialized::<LR_NonZero>(),
--            "attempted to leave type `LR_NonZero` uninitialized, which is 
invalid"
--        );
--        test_panic_msg(
--            || mem::zeroed::<LR_NonZero>(),
--            "attempted to zero-initialize type `LR_NonZero`, which is invalid"
--        );
--
--        test_panic_msg(
--            || mem::uninitialized::<ManuallyDrop<LR_NonZero>>(),
--            "attempted to leave type `std::mem::ManuallyDrop<LR_NonZero>` 
uninitialized, \
--             which is invalid"
--        );
--        test_panic_msg(
--            || mem::zeroed::<ManuallyDrop<LR_NonZero>>(),
--            "attempted to zero-initialize type 
`std::mem::ManuallyDrop<LR_NonZero>`, \
--             which is invalid"
--        );
--        */
--
-         test_panic_msg(
-             || mem::uninitialized::<(NonNull<u32>, u32, u32)>(),
-             "attempted to leave type `(core::ptr::non_null::NonNull<u32>, 
u32, u32)` uninitialized, \
-                 which is invalid"
-         );
-+
-         test_panic_msg(
-             || mem::zeroed::<(NonNull<u32>, u32, u32)>(),
-             "attempted to zero-initialize type 
`(core::ptr::non_null::NonNull<u32>, u32, u32)`, \
-@@ -196,11 +182,23 @@ fn main() {
-                 which is invalid"
-         );
- 
-+        test_panic_msg(
-+            || mem::uninitialized::<LR_NonZero>(),
-+            "attempted to leave type `LR_NonZero` uninitialized, which is 
invalid"
-+        );
-+
-+        test_panic_msg(
-+            || mem::uninitialized::<ManuallyDrop<LR_NonZero>>(),
-+            "attempted to leave type 
`core::mem::manually_drop::ManuallyDrop<LR_NonZero>` uninitialized, \
-+             which is invalid"
-+        );
-+
-         test_panic_msg(
-             || mem::uninitialized::<NoNullVariant>(),
-             "attempted to leave type `NoNullVariant` uninitialized, \
-                 which is invalid"
-         );
-+
-         test_panic_msg(
-             || mem::zeroed::<NoNullVariant>(),
-             "attempted to zero-initialize type `NoNullVariant`, \
-@@ -212,10 +210,12 @@ fn main() {
-             || mem::uninitialized::<bool>(),
-             "attempted to leave type `bool` uninitialized, which is invalid"
-         );
-+
-         test_panic_msg(
-             || mem::uninitialized::<LR>(),
-             "attempted to leave type `LR` uninitialized, which is invalid"
-         );
-+
-         test_panic_msg(
-             || mem::uninitialized::<ManuallyDrop<LR>>(),
-             "attempted to leave type 
`core::mem::manually_drop::ManuallyDrop<LR>` uninitialized, which is invalid"
-@@ -229,6 +229,7 @@ fn main() {
-         let _val = mem::zeroed::<Option<&'static i32>>();
-         let _val = mem::zeroed::<MaybeUninit<NonNull<u32>>>();
-         let _val = mem::zeroed::<[!; 0]>();
-+        let _val = mem::zeroed::<ZeroIsValid>();
-         let _val = mem::uninitialized::<MaybeUninit<bool>>();
-         let _val = mem::uninitialized::<[!; 0]>();
-         let _val = mem::uninitialized::<()>();
-@@ -259,12 +260,33 @@ fn main() {
-                 || mem::zeroed::<[NonNull<()>; 1]>(),
-                 "attempted to zero-initialize type 
`[core::ptr::non_null::NonNull<()>; 1]`, which is invalid"
-             );
-+
-+            // FIXME(#66151) we conservatively do not error here yet (by 
default).
-+            test_panic_msg(
-+                || mem::zeroed::<LR_NonZero>(),
-+                "attempted to zero-initialize type `LR_NonZero`, which is 
invalid"
-+            );
-+
-+            test_panic_msg(
-+                || mem::zeroed::<ManuallyDrop<LR_NonZero>>(),
-+                "attempted to zero-initialize type 
`core::mem::manually_drop::ManuallyDrop<LR_NonZero>`, \
-+                 which is invalid"
-+            );
-         } else {
-             // These are UB because they have not been officially blessed, 
but we await the resolution
-             // of 
<https://github.com/rust-lang/unsafe-code-guidelines/issues/71> before doing
-             // anything about that.
-             let _val = mem::uninitialized::<i32>();
-             let _val = mem::uninitialized::<*const ()>();
-+
-+            // These are UB, but best to test them to ensure we don't become 
unintentionally
-+            // stricter.
-+
-+            // It's currently unchecked to create invalid enums and values 
inside arrays.
-+            let _val = mem::zeroed::<LR_NonZero>();
-+            let _val = mem::zeroed::<[LR_NonZero; 1]>();
-+            let _val = mem::zeroed::<[NonNull<()>; 1]>();
-+            let _val = mem::uninitialized::<[NonNull<()>; 1]>();
-         }
-     }
- }
diff --git a/gnu/packages/patches/rust-1.78-unwinding-fix.patch 
b/gnu/packages/patches/rust-1.78-unwinding-fix.patch
deleted file mode 100644
index 8e98d6d7d95..00000000000
--- a/gnu/packages/patches/rust-1.78-unwinding-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From ce49a9d9e52ca6062fe0894e72d954511fa8820f Mon Sep 17 00:00:00 2001
-From: Shmuel Hazan <[email protected]>
-Date: Sat, 1 Jun 2024 08:49:44 +0300
-Subject: [PATCH] Add UWTable attr to functions with a personality function
-
-Adding a personality function forces LLVM to generate unwinding info that 
might be incorrect.
-To solve it, always apply the UWTable attribute when setting a personality 
function.
-
-Fixes #123733
----
- compiler/rustc_codegen_llvm/src/builder.rs | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/compiler/rustc_codegen_llvm/src/builder.rs 
b/compiler/rustc_codegen_llvm/src/builder.rs
-index 72ff9ea118e28..668f0a33a4e80 100644
---- a/compiler/rustc_codegen_llvm/src/builder.rs
-+++ b/compiler/rustc_codegen_llvm/src/builder.rs
-@@ -1029,6 +1029,11 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for 
Builder<'a, 'll, 'tcx> {
-     }
- 
-     fn set_personality_fn(&mut self, personality: &'ll Value) {
-+        // Work around for https://github.com/rust-lang/rust/issues/123733
-+        // add the UWTable attribute to every function with a personality 
function.
-+        let uwtable = attributes::uwtable_attr(self.llcx, None);
-+        attributes::apply_to_llfn(self.llfn(), 
llvm::AttributePlace::Function, &[uwtable]);
-+
-         unsafe {
-             llvm::LLVMSetPersonalityFn(self.llfn(), personality);
-         }
diff --git a/gnu/packages/patches/rust-1.81-fix-riscv64-bootstrap.patch 
b/gnu/packages/patches/rust-1.81-fix-riscv64-bootstrap.patch
deleted file mode 100644
index 39a79a9628e..00000000000
--- a/gnu/packages/patches/rust-1.81-fix-riscv64-bootstrap.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 99e6a28804eac57faa37134d61a2bb17069996a2 Mon Sep 17 00:00:00 2001
-From: Nicholas Bishop <[email protected]>
-Date: Thu, 30 May 2024 18:32:46 -0400
-Subject: [PATCH] Add f16/f128 handling in a couple places
-
----
- compiler/rustc_codegen_llvm/src/abi.rs    | 2 ++
- compiler/rustc_target/src/abi/call/mod.rs | 2 ++
- 2 files changed, 4 insertions(+)
-
-diff --git a/compiler/rustc_codegen_llvm/src/abi.rs 
b/compiler/rustc_codegen_llvm/src/abi.rs
-index a6a3f0f964611..2e52d3f426a83 100644
---- a/compiler/rustc_codegen_llvm/src/abi.rs
-+++ b/compiler/rustc_codegen_llvm/src/abi.rs
-@@ -121,8 +121,10 @@ impl LlvmType for Reg {
-         match self.kind {
-             RegKind::Integer => cx.type_ix(self.size.bits()),
-             RegKind::Float => match self.size.bits() {
-+                16 => cx.type_f16(),
-                 32 => cx.type_f32(),
-                 64 => cx.type_f64(),
-+                128 => cx.type_f128(),
-                 _ => bug!("unsupported float: {:?}", self),
-             },
-             RegKind::Vector => cx.type_vector(cx.type_i8(), 
self.size.bytes()),
-diff --git a/compiler/rustc_target/src/abi/call/mod.rs 
b/compiler/rustc_target/src/abi/call/mod.rs
-index fc79c9232d1bd..f83d0492004a2 100644
---- a/compiler/rustc_target/src/abi/call/mod.rs
-+++ b/compiler/rustc_target/src/abi/call/mod.rs
-@@ -236,8 +236,10 @@ impl Reg {
-                 _ => panic!("unsupported integer: {self:?}"),
-             },
-             RegKind::Float => match self.size.bits() {
-+                16 => dl.f16_align.abi,
-                 32 => dl.f32_align.abi,
-                 64 => dl.f64_align.abi,
-+                128 => dl.f128_align.abi,
-                 _ => panic!("unsupported float: {self:?}"),
-             },
-             RegKind::Vector => dl.vector_align(self.size).abi,
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 3f83eff9127..80dcd235313 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -761,1085 +761,6 @@ safety and thread safety guarantees.")
     ;; Dual licensed.
     (license (list license:asl2.0 license:expat))))
 
-(define-public rust-1.55
-  (package
-    (name "rust")
-    (version "1.55.0")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (rust-uri version))
-       (sha256 (base32 "07l28f7grdmi65naq71pbmvdd61hwcpi40ry7kp7dy7m233rldxj"))
-       (modules '((guix build utils)))
-       (snippet
-        '(begin
-           (for-each delete-file-recursively
-                     '("src/llvm-project"
-                       "vendor/openssl-src/openssl"
-                       "vendor/tikv-jemalloc-sys/jemalloc"))
-           ;; Remove vendored dynamically linked libraries.
-           ;; find . -not -type d -executable -exec file {} \+ | grep ELF
-           (delete-file "vendor/vte/vim10m_match")
-           (delete-file "vendor/vte/vim10m_table")
-           ;; Also remove the bundled (mostly Windows) libraries.
-           ;; find vendor -not -type d -exec file {} \+ | grep PE32
-           (for-each delete-file
-                     (find-files "vendor" "\\.(a|dll|exe|lib)$"))
-           ;; Add support for riscv64-linux.
-           (substitute* "vendor/tikv-jemallocator/src/lib.rs"
-             (("    target_arch = \"s390x\"," all)
-              (string-append all "\n    target_arch = \"riscv64\",")))))))
-    (outputs '("out" "cargo"))
-    (properties '((hidden? . #t)
-                  (timeout . 72000)           ;20 hours
-                  (max-silent-time . 18000))) ;5 hours (for armel)
-    (build-system gnu-build-system)
-    (arguments
-     `(#:validate-runpath? #f
-       ;; Only the final Rust is tested, not the intermediate bootstrap ones,
-       ;; for performance and simplicity.
-       #:tests? #f
-       #:imported-modules ,%cargo-utils-modules ;for `generate-all-checksums'
-       #:modules ((guix build cargo-utils)
-                  (guix build utils)
-                  (guix build gnu-build-system)
-                  (ice-9 match)
-                  (srfi srfi-1))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'set-env
-           (lambda* (#:key inputs #:allow-other-keys)
-             (setenv "SHELL" (which "sh"))
-             (setenv "CONFIG_SHELL" (which "sh"))
-             (setenv "CC" (search-input-file inputs "/bin/gcc"))
-             ;; The Guix LLVM package installs only shared libraries.
-             (setenv "LLVM_LINK_SHARED" "1")))
-         (add-after 'unpack 'set-linker-locale-to-utf8
-           (lambda _
-             (substitute* (find-files "." "^linker.rs$")
-               (("linker.env\\(\"LC_ALL\", \"C\"\\);")
-                "linker.env(\"LC_ALL\", \"C.UTF-8\");"))))
-         (add-after 'unpack 'add-cc-shim-to-path
-           (lambda _
-             (mkdir-p "/tmp/bin")
-             (symlink (which "gcc") "/tmp/bin/cc")
-             (setenv "PATH" (string-append "/tmp/bin:" (getenv "PATH")))))
-         (replace 'configure
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (call-with-output-file "config.toml"
-               (lambda (port)
-                 (display (string-append "
-[llvm]
-[build]
-cargo = \"" (search-input-file inputs "bin/cargo") "\"
-rustc = \"" (search-input-file inputs "bin/rustc") "\"
-docs = false
-python = \"" (search-input-file inputs "bin/python") "\"
-vendor = true
-submodules = false
-[install]
-prefix = \"" (assoc-ref outputs "out") "\"
-sysconfdir = \"etc\"
-[rust]
-debug=false
-jemalloc=false
-default-linker = \"" (search-input-file inputs "bin/gcc") "\"
-channel = \"stable\"
-rpath = true
-[target." ,(platform-rust-target (lookup-platform-by-system 
(%current-system))) "]
-llvm-config = \"" (search-input-file inputs "bin/llvm-config") "\"
-cc = \"" (search-input-file inputs "bin/gcc") "\"
-cxx = \"" (search-input-file inputs "bin/g++") "\"
-ar = \"" (search-input-file inputs "bin/ar") "\"
-[dist]
-") port)))))
-         (replace 'build
-           ;; The standard library source location moved in this release.
-           (lambda* (#:key parallel-build? #:allow-other-keys)
-             (let ((job-spec (string-append
-                              "-j" (if parallel-build?
-                                       (number->string (parallel-job-count))
-                                       "1"))))
-               (invoke "./x.py" job-spec "build" "--stage=1"
-                       "library/std"
-                       "src/tools/cargo"))))
-         (replace 'install
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (cargo-out (assoc-ref outputs "cargo"))
-                    (build (string-append "build/"
-                                          ,(platform-rust-target
-                                            
(lookup-platform-by-target-or-system
-                                             (or (%current-target-system)
-                                                 (%current-system)))))))
-               ;; Manually do the installation instead of calling './x.py
-               ;; install', as that is slow and needlessly rebuilds some
-               ;; things.
-
-               ;; TODO: Try reverting to use "./x.py install rustc std cargo"
-               ;; for Rust 1.91 and newer, which should no longer rebuild
-               ;; things unnecessarily.
-               (with-directory-excursion build
-                 (install-file "stage1/bin/rustc" (string-append out "/bin"))
-                 (install-file "stage1-tools-bin/cargo"
-                               (string-append cargo-out "/bin"))
-                 ;; Clean up some extraneous library files.  The .rmeta files
-                 ;; of the bootstrap compiler are not meant to be installed.
-                 (for-each delete-file (find-files "stage1/lib" "\\.rmeta$"))
-                 ;; This librustc_driver binary is internal and not supposed
-                 ;; to be installed.  It started causing issues with the build
-                 ;; around Rust 1.89.
-                 (for-each delete-file
-                           (find-files "stage1/lib/rustlib"
-                                       "^librustc_driver.*\\.so$"))
-                 (copy-recursively "stage1/lib" (string-append out "/lib"))))))
-         (add-after 'install 'delete-install-logs
-           (lambda* (#:key outputs #:allow-other-keys)
-             (for-each (lambda (f)
-                         (false-if-exception (delete-file f)))
-                       (append-map (lambda (output)
-                                     (find-files (string-append
-                                                  output "/lib/rustlib")
-                                                 "(^install.log$|^manifest-)"))
-                                   (map cdr outputs)))))
-         (add-after 'install 'wrap-rustc
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out"))
-                   (libc (assoc-ref inputs "libc"))
-                   (ld-wrapper (assoc-ref inputs "ld-wrapper")))
-               ;; Let gcc find ld and libc startup files.
-               (wrap-program (string-append out "/bin/rustc")
-                 `("PATH" ":" prefix (,(string-append ld-wrapper "/bin")))
-                 `("LIBRARY_PATH" ":"
-                   suffix (,(string-append libc "/lib"))))))))))
-    (native-inputs
-     (list pkg-config
-           python-minimal-wrapper
-           python-setuptools-bootstrap
-           rust-bootstrap-1.54
-           `(,rust-bootstrap-1.54 "cargo")))
-    (inputs
-     (list bash-minimal
-           llvm-13
-           openssl))
-    ;; rustc invokes gcc, so we need to set its search paths accordingly.
-    (native-search-paths
-     %gcc-search-paths)
-    ;; Limit this to systems where the final rust compiler builds successfully.
-    (supported-systems '("x86_64-linux" "aarch64-linux" "riscv64-linux"))
-    (synopsis "Compiler for the Rust programming language")
-    (description "Rust is a systems programming language that provides memory
-safety and thread safety guarantees.")
-    (home-page "https://www.rust-lang.org";)
-    ;; Dual licensed.
-    (license (list license:asl2.0 license:expat))))
-
-(define-public rust-1.56
-  (let ((base-rust (rust-bootstrapped-package
-                    rust-1.55 "1.56.1"
-                    "04cmqx7nn63hzz7z27b2b0dj2qx18rck9ifvip43s6dampx8v2f3")))
-    (package
-      (inherit base-rust)
-      (arguments
-       (substitute-keyword-arguments
-         (strip-keyword-arguments '(#:validate-runpath?)
-                                  (package-arguments base-rust))
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (delete 'add-cc-shim-to-path)
-             (add-after 'patch-generated-file-shebangs 'patch-cargo-checksums
-               (lambda _
-                 (substitute* "Cargo.lock"
-                   (("(checksum = )\".*\"" all name)
-                    (string-append name "\"" ,%cargo-reference-hash "\"")))
-                 (generate-all-checksums "vendor"))))))))))
-
-(define-public rust-1.57
-  (rust-bootstrapped-package
-   ;; Verified that it *doesn't* build with 1.55. e.g.:
-   ;; * feature `edition2021` is required
-   rust-1.56 "1.57.0" "06jw8ka2p3kls8p0gd4p0chhhb1ia1mlvj96zn78n7qvp71zjiim"))
-
-(define-public rust-1.58
-  (rust-bootstrapped-package
-   ;; Verified that it *doesn't* build with 1.56. e.g.:
-   ;; * error: attributes starting with `rustc` are reserved for use by the
-   ;;   `rustc` compiler
-   ;; * error: cannot find attribute `rustc_do_not_const_check` in this scope
-   ;; * error[E0522]: definition of an unknown language item:
-   ;;   `const_eval_select_ct`
-   rust-1.57 "1.58.1" "1iq7kj16qfpkx8gvw50d8rf7glbm6s0pj2y1qkrz7mi56vfsyfd8"))
-
-(define-public rust-1.59
-  (let ((base-rust
-          (rust-bootstrapped-package
-            ;; Verified that it *doesn't* build with 1.57. e.g.:
-            ;; * error: `doc(primitive)` should never have been stable
-            ;; * error[E0522]: definition of an unknown language item:
-            ;;   `generator_return`
-            ;; * error[E0206]: the trait `Copy` may not be implemented for 
this type
-            rust-1.58 "1.59.0" 
"1yc5bwcbmbwyvpfq7zvra78l0r8y3lbv60kbr62fzz2vx2pfxj57")))
-    (package
-      (inherit base-rust)
-        (arguments
-         (if (target-riscv64?)
-           (substitute-keyword-arguments (package-arguments base-rust)
-             ((#:phases phases)
-              `(modify-phases ,phases
-                 (add-after 'unpack 'revert-riscv-pause-instruction
-                   (lambda _
-                     ;; This fails with:
-                     ;; error: unknown directive, referring to '.insn'.
-                     ;; This is due to building with llvm < 14.
-                     ;; https://github.com/rust-lang/stdarch/issues/1291
-                     ;; Partial roll-back from this commit:
-                     ;; https://github.com/rust-lang/stdarch/pull/1271
-                     (substitute*
-                       
"library/stdarch/crates/core_arch/src/riscv_shared/mod.rs"
-                       (("\\.insn i 0x0F, 0, x0, x0, 0x010") ".word 
0x0100000F")))))))
-           (package-arguments base-rust))))))
-
-(define-public rust-1.60
-  (rust-bootstrapped-package
-   ;; Verified that it *doesn't* build with 1.58. e.g.:
-   ;; * error: unknown codegen option: `symbol-mangling-version`
-   rust-1.59 "1.60.0" "1drqr0a26x1rb2w3kj0i6abhgbs3jx5qqkrcwbwdlx7n3inq5ji0"))
-
-(define-public rust-1.61
-  (let ((base-rust
-          (rust-bootstrapped-package
-           rust-1.60 "1.61.0" 
"1vfs05hkf9ilk19b2vahqn8l6k17pl9nc1ky9kgspaascx8l62xd")))
-    (package
-      (inherit base-rust)
-      (source
-        (origin
-          (inherit (package-source base-rust))
-          (snippet
-           '(begin
-              (for-each delete-file-recursively
-                        '("src/llvm-project"
-                          "vendor/openssl-src/openssl"
-                          "vendor/tikv-jemalloc-sys/jemalloc"))
-              ;; Remove vendored dynamically linked libraries.
-              ;; find . -not -type d -executable -exec file {} \+ | grep ELF
-              (delete-file "vendor/vte/vim10m_match")
-              (delete-file "vendor/vte/vim10m_table")
-              ;; Also remove the bundled (mostly Windows) libraries.
-              (for-each delete-file
-                        (find-files "vendor" "\\.(a|dll|exe|lib)$")))))))))
-
-(define-public rust-1.62
-  (rust-bootstrapped-package
-   rust-1.61 "1.62.1" "0gqkg34ic77dcvsz69qbdng6g3zfhl6hnhx7ha1mjkyrzipvxb3j"))
-
-(define-public rust-1.63
-  (rust-bootstrapped-package
-   rust-1.62 "1.63.0" "1l4rrbzhxv88pnfq94nbyb9m6lfnjwixma3mwjkmvvs2aqlq158z"))
-
-(define-public rust-1.64
-  (let ((base-rust
-         (rust-bootstrapped-package
-          rust-1.63 "1.64.0" 
"018j720b2n12slp4xk64jc6shkncd46d621qdyzh2a8s3r49zkdk")))
-    (package
-      (inherit base-rust)
-      (source
-       (origin
-         (inherit (package-source base-rust))
-         (snippet
-          '(begin
-             (for-each delete-file-recursively
-                       '("src/llvm-project"
-                         "vendor/openssl-src/openssl"
-                         "vendor/tikv-jemalloc-sys/jemalloc"))
-             ;; ERROR: could not find native static library
-             ;; `rustix_outline_powerpc64`, perhaps an -L flag is missing?
-             ;; Adjust rustix to always build with cc.
-             (substitute* "src/bootstrap/Cargo.lock"
-               (("\"errno\",") "\"cc\",\n \"errno\","))
-             ;; Add a dependency on the the 'cc' feature of rustix.
-             (substitute* "vendor/fd-lock/Cargo.toml"
-               (("\"fs\"") "\"fs\", \"cc\""))
-             ;; Remove vendored dynamically linked libraries.
-             ;; find . -not -type d -executable -exec file {} \+ | grep ELF
-             (delete-file "vendor/vte/vim10m_match")
-             (delete-file "vendor/vte/vim10m_table")
-             ;; Also remove the bundled (mostly Windows) libraries.
-             (for-each delete-file
-                       (find-files "vendor" "\\.(a|dll|exe|lib)$"))))
-         (patches (search-patches "rust-1.64-fix-riscv64-bootstrap.patch"))
-         (patch-flags '("-p1" "--reverse"))))
-      (arguments
-       (substitute-keyword-arguments (package-arguments base-rust)
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (replace 'patch-cargo-checksums
-               (lambda _
-                 (substitute* '("Cargo.lock"
-                                "src/bootstrap/Cargo.lock"
-                                "src/tools/rust-analyzer/Cargo.lock")
-                   (("(checksum = )\".*\"" all name)
-                    (string-append name "\"" ,%cargo-reference-hash "\"")))
-                 (generate-all-checksums "vendor"))))))))))
-
-(define-public rust-1.65
-  (let ((base-rust
-         (rust-bootstrapped-package
-          rust-1.64 "1.65.0" 
"0f005kc0vl7qyy298f443i78ibz71hmmh820726bzskpyrkvna2q")))
-    (package
-      (inherit base-rust)
-      (source
-       (origin
-         (inherit (package-source base-rust))
-         (patches '())
-         (patch-flags '("-p1")))))))
-
-(define-public rust-1.66
-  (rust-bootstrapped-package
-   rust-1.65 "1.66.1" "1fjr94gsicsxd2ypz4zm8aad1zdbiccr7qjfbmq8f8f7jhx96g2v"))
-
-(define-public rust-1.67
-  (let ((base-rust
-          (rust-bootstrapped-package
-           rust-1.66 "1.67.1" 
"0vpzv6rm3w1wbni17ryvcw83k5klhghklylfdza3nnp8blz3sj26")))
-    (package
-      (inherit base-rust)
-      (source
-       (origin
-         (inherit (package-source base-rust))
-         (snippet
-          '(begin
-             (for-each delete-file-recursively
-                       '("src/llvm-project"
-                         "vendor/openssl-src/openssl"
-                         "vendor/tikv-jemalloc-sys/jemalloc"))
-             ;; Adjust rustix to always build with cc.
-             (substitute* '("Cargo.lock"
-                            "src/bootstrap/Cargo.lock")
-               (("\"errno\",") "\"cc\",\n \"errno\","))
-             ;; Add a dependency on the the 'cc' feature of rustix.
-             (substitute* "vendor/fd-lock/Cargo.toml"
-               (("\"fs\"") "\"fs\", \"cc\""))
-             (substitute* "vendor/is-terminal/Cargo.toml"
-               (("\"termios\"") "\"termios\", \"cc\""))
-             ;; Remove vendored dynamically linked libraries.
-             ;; find . -not -type d -executable -exec file {} \+ | grep ELF
-             (delete-file "vendor/vte/vim10m_match")
-             (delete-file "vendor/vte/vim10m_table")
-             ;; Also remove the bundled (mostly Windows) libraries.
-             (for-each delete-file
-                       (find-files "vendor" "\\.(a|dll|exe|lib)$"))))))
-      (inputs (modify-inputs inputs
-                             (replace "llvm" llvm-15))))))
-
-(define-public rust-1.68
-  (rust-bootstrapped-package
-   rust-1.67 "1.68.2" "15ifyd5jj8rd979dkakp887hgmhndr68pqaqvd2hqkfdywirqcwk"))
-
-(define-public rust-1.69
-  (let ((base-rust
-          (rust-bootstrapped-package
-            rust-1.68 "1.69.0"
-            "03zn7kx5bi5mdfsqfccj4h8gd6abm7spj0kjsfxwlv5dcwc9f1gv")))
-    (package
-      (inherit base-rust)
-      (source
-        (origin
-          (inherit (package-source base-rust))
-          (snippet
-           '(begin
-              (for-each delete-file-recursively
-                        '("src/llvm-project"
-                          "vendor/openssl-src/openssl"
-                          "vendor/tikv-jemalloc-sys/jemalloc"))
-              ;; Adjust rustix to always build with cc.
-              (substitute* '("Cargo.lock"
-                             "src/bootstrap/Cargo.lock")
-                (("\"errno\",") "\"cc\",\n \"errno\","))
-              ;; Add a dependency on the the 'cc' feature of rustix.
-              (substitute* "vendor/fd-lock/Cargo.toml"
-                (("\"fs\"") "\"fs\", \"cc\""))
-              (substitute* "vendor/is-terminal/Cargo.toml"
-                (("\"termios\"") "\"termios\", \"cc\""))
-              ;; Also remove the bundled (mostly Windows) libraries.
-              (for-each delete-file
-                        (find-files "vendor" "\\.(a|dll|exe|lib)$")))))))))
-
-(define-public rust-1.70
-  (let ((base-rust
-         (rust-bootstrapped-package
-          rust-1.69 "1.70.0"
-                      "0z6j7d0ni0rmfznv0w3mrf882m11kyh51g2bxkj40l3s1c0axgxj")))
-   (package
-     (inherit base-rust)
-     (source
-      (origin
-        (inherit (package-source base-rust))
-        (snippet
-         '(begin
-            (for-each delete-file-recursively
-                      '("src/llvm-project"
-                        "vendor/openssl-src/openssl"
-                        "vendor/tikv-jemalloc-sys/jemalloc"))
-             ;; Adjust rustix to always build with cc.
-             (substitute* "Cargo.lock"
-               (("\"errno\",") "\"cc\",\n \"errno\","))
-            ;; Add a dependency on the the 'cc' feature of rustix.
-            (substitute* '("vendor/is-terminal/Cargo.toml"
-                           "vendor/is-terminal-0.4.4/Cargo.toml")
-              (("\"termios\"") "\"termios\", \"cc\""))
-            ;; Also remove the bundled (mostly Windows) libraries.
-            (for-each delete-file
-                      (find-files "vendor" "\\.(a|dll|exe|lib)$"))))
-        ;; Rust 1.70 adds the rustix library which depends on the vendored
-        ;; fd-lock crate.  The fd-lock crate uses Outline assembly which 
expects
-        ;; a precompiled static library.  Enabling the "cc" feature tells the
-        ;; build.rs script to compile the assembly files instead of searching
-        ;; for a precompiled library.
-        (patches (search-patches "rust-1.70-fix-rustix-build.patch")))))))
-
-(define-public rust-1.71
-  (let ((base-rust
-          (rust-bootstrapped-package
-           rust-1.70 "1.71.1" 
"0bj79syjap1kgpg9pc0r4jxc0zkxwm6phjf3digsfafms580vabg")))
-    (package
-      (inherit base-rust)
-      (source
-       (origin
-         (inherit (package-source base-rust))
-         (snippet
-          '(begin
-             (for-each delete-file-recursively
-                       '("src/llvm-project"
-                         "vendor/openssl-src/openssl"
-                         "vendor/tikv-jemalloc-sys/jemalloc"))
-             ;; Adjust rustix to always build with cc.
-             (substitute* '("Cargo.lock"
-                            "src/tools/cargo/Cargo.lock")
-               (("\"errno\",") "\"cc\",\n \"errno\","))
-             ;; Add a dependency on the the 'cc' feature of rustix.
-             (substitute* '("vendor/is-terminal/Cargo.toml"
-                            "vendor/is-terminal-0.4.6/Cargo.toml")
-               (("\"termios\"") "\"termios\", \"cc\""))
-             ;; Also remove the bundled (mostly Windows) libraries.
-             (for-each delete-file
-                       (find-files "vendor" "\\.(a|dll|exe|lib)$"))))))
-      (arguments
-       (substitute-keyword-arguments (package-arguments base-rust)
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (replace 'patch-cargo-checksums
-               (lambda _
-                 (substitute* (cons* "Cargo.lock"
-                                     "src/bootstrap/Cargo.lock"
-                                     (find-files "src/tools" "Cargo.lock"))
-                   (("(checksum = )\".*\"" all name)
-                    (string-append name "\"" ,%cargo-reference-hash "\"")))
-                 (generate-all-checksums "vendor"))))))))))
-
-(define-public rust-1.72
-  (let ((base-rust
-          (rust-bootstrapped-package
-           rust-1.71 "1.72.1" 
"15gqd1jzhnc16a7gjmav4x1v83jjbzyjh1gvcdfvpkajd9gq8j3z")))
-    (package
-      (inherit base-rust)
-      (source
-        (origin
-          (inherit (package-source base-rust))
-          (snippet
-           '(begin
-              (for-each delete-file-recursively
-                        '("src/llvm-project"
-                          "vendor/openssl-src/openssl"
-                          "vendor/tikv-jemalloc-sys/jemalloc"))
-              ;; Remove vendored dynamically linked libraries.
-              ;; find . -not -type d -executable -exec file {} \+ | grep ELF
-              ;; Also remove the bundled (mostly Windows) libraries.
-              (for-each delete-file
-                        (find-files "vendor" "\\.(a|dll|exe|lib)$"))
-              ;; Adjust some crates to explicitly use rustix with the libc 
backend.
-              (substitute* '("vendor/is-terminal/Cargo.toml"
-                             "vendor/is-terminal-0.4.7/Cargo.toml")
-                (("\"termios\"") "\"termios\", \"use-libc\""))
-              (substitute* "compiler/rustc_driver/Cargo.toml"
-                (("rustix = \"=0.37.11\"")
-                 (string-append "rustix = { version = \"=0.37.11\","
-                                " features = [\"use-libc\"] }"))))))))))
-
-(define-public rust-1.73
-  (let ((base-rust (rust-bootstrapped-package rust-1.72 "1.73.0"
-                    "0fmvn7vg3qg9xprgfwv10g3ygy8i4j4bkcxcr1xdy89d3xnjxmln")))
-    (package
-      (inherit base-rust)
-      (source
-       (origin
-         (inherit (package-source base-rust))
-         (snippet
-          '(begin
-             (for-each delete-file-recursively
-                       '("src/llvm-project"
-                         "vendor/openssl-src/openssl"
-                         "vendor/tikv-jemalloc-sys/jemalloc"))
-             ;; Remove vendored dynamically linked libraries.
-             ;; find . -not -type d -executable -exec file {} \+ | grep ELF
-             ;; Also remove the bundled (mostly Windows) libraries.
-             (for-each delete-file
-                       (find-files "vendor" "\\.(a|dll|exe|lib)$"))
-             ;; Adjust vendored dependency to explicitly use rustix with libc 
backend.
-             (substitute* "vendor/tempfile-3.6.0/Cargo.toml"
-               (("features = \\[\"fs\"" all)
-                (string-append all ", \"use-libc\""))))))))))
-
-(define-public rust-1.74
-  (let ((base-rust (rust-bootstrapped-package rust-1.73 "1.74.1"
-                    "07930r17dkj3dnsrmilywb6p9i2g2jx56ndfpa2wh8crzhi3xnv7")))
-    (package
-      (inherit base-rust)
-      (source
-       (origin
-         (inherit (package-source base-rust))
-         (snippet
-          '(begin
-             (for-each delete-file-recursively
-                       '("src/llvm-project"
-                         "vendor/openssl-src/openssl"
-                         "vendor/tikv-jemalloc-sys/jemalloc"))
-             ;; Remove vendored dynamically linked libraries.
-             ;; find . -not -type d -executable -exec file {} \+ | grep ELF
-             ;; Also remove the bundled (mostly Windows) libraries.
-             (for-each delete-file
-                       (find-files "vendor" "\\.(a|dll|exe|lib)$"))
-             ;; Adjust vendored dependency to explicitly use rustix with libc 
backend.
-             (substitute* "vendor/tempfile/Cargo.toml"
-               (("features = \\[\"fs\"" all)
-                (string-append all ", \"use-libc\"")))))))
-      (arguments
-       (if (target-riscv64?)
-         (substitute-keyword-arguments (package-arguments base-rust)
-           ((#:phases phases)
-            `(modify-phases ,phases
-               ;; This phase is no longer needed.
-               (delete 'revert-riscv-pause-instruction))))
-         (package-arguments base-rust))))))
-
-(define-public rust-1.75
-  (let ((base-rust (rust-bootstrapped-package
-                    rust-1.74 "1.75.0"
-                    "1260mf3066ki6y55pvr35lnf54am6z96a3ap3hniwd4xpi2rywsv")))
-    (package
-      (inherit base-rust)
-      (source
-       (origin
-         (inherit (package-source base-rust))
-         (patches '())))
-      (arguments
-       (if (supported-package? rust-bootstrap-1.74)
-           (substitute-keyword-arguments (package-arguments base-rust)
-             ((#:phases phases)
-              `(modify-phases ,phases
-                 (add-after 'unpack 'add-cc-shim-to-path
-                   (lambda _
-                     (mkdir-p "/tmp/bin")
-                     (symlink (which "gcc") "/tmp/bin/cc")
-                     (setenv "PATH" (string-append "/tmp/bin:" (getenv 
"PATH")))))
-                 (replace 'install
-                   (lambda* (#:key outputs #:allow-other-keys)
-                     (let* ((out (assoc-ref outputs "out"))
-                            (cargo-out (assoc-ref outputs "cargo"))
-                            (build (string-append "build/"
-                                                  ,(platform-rust-target
-                                                    
(lookup-platform-by-target-or-system
-                                                     (or 
(%current-target-system)
-                                                         
(%current-system)))))))
-                       ;; Manually do the installation instead of calling 
'./x.py
-                       ;; install', as that is slow and needlessly rebuilds 
some
-                       ;; things.
-
-                       ;; TODO: Try reverting to use "./x.py install rustc std 
cargo"
-                       ;; for Rust 1.91 and newer, which should no longer 
rebuild
-                       ;; things unnecessarily.
-                       (with-directory-excursion build
-                         (install-file "stage1/bin/rustc" (string-append out 
"/bin"))
-                         (install-file "stage1-tools-bin/cargo"
-                                       (string-append cargo-out "/bin"))
-                         ;; Clean up some extraneous library files.  The 
.rmeta files
-                         ;; of the bootstrap compiler are not meant to be 
installed.
-                         (for-each delete-file (find-files "stage1/lib" 
"\\.rmeta$"))
-                         ;; This librustc_driver binary is internal and not 
supposed
-                         ;; to be installed.  It started causing issues with 
the build
-                         ;; around Rust 1.89.
-                         (for-each delete-file
-                                   (find-files "stage1/lib/rustlib"
-                                               "^librustc_driver.*\\.so$"))
-                         (copy-recursively "stage1/lib" (string-append out 
"/lib")))))))))
-           (package-arguments base-rust)))
-      (native-inputs
-       (if (supported-package? rust-bootstrap-1.74)
-           (list pkg-config
-                 python-minimal-wrapper
-                 python-setuptools-bootstrap
-                 rust-bootstrap-1.74
-                 (list rust-bootstrap-1.74 "cargo"))
-           (package-native-inputs base-rust)))
-      (inputs (modify-inputs inputs
-                (replace "llvm" llvm-17))))))
-
-(define-public rust-1.76
-  (let ((base-rust (rust-bootstrapped-package rust-1.75 "1.76.0"
-                    "08f06shp6l72qrv5fwg1is7yzr6kwj8av0l9h5k243bz781zyp4y")))
-    (package
-      (inherit base-rust)
-      (arguments
-       (substitute-keyword-arguments (package-arguments base-rust)
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (delete 'add-cc-shim-to-path))))))))
-
-(define-public rust-1.77
-  (let ((base-rust (rust-bootstrapped-package rust-1.76 "1.77.2"
-                    "1hrq2r9brhwl77qv18qk4pqrzfgnn9w6fwf7vgykhrjrizpmf566")))
-    (package
-      (inherit base-rust)
-      (arguments
-       (substitute-keyword-arguments (package-arguments base-rust)
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'configure 'no-optimized-compiler-builtins
-               (lambda _
-                 ;; Pre-1.77, the behavior was equivalent to this flag being
-                 ;; "false" if the llvm-project submodule wasn't checked out.
-                 ;;
-                 ;; Now there's an explicit check, so the build fails if we 
don't
-                 ;; manually disable this (given that we don't have the 
submodule checked out).
-                 ;; Thus making the build behave the same as it did in 1.76 
and earlier.
-                 ;;
-                 ;; TODO - make the build system depend on system llvm for 
this, so we
-                 ;; can get the performance benefits of setting this to true?
-                 (substitute* "config.toml"
-                   (("\\[build\\]")
-                    "[build]\noptimized-compiler-builtins = false")))))))))))
-
-(define-public rust-1.78
-  (let ((base-rust (rust-bootstrapped-package rust-1.77 "1.78.0"
-                    "1afmj5g3bz7439w4i8zjhd68zvh0gqg7ymr8h5rz49ybllilhm7z")))
-    (package
-      (inherit base-rust)
-      (source
-       (origin
-         (inherit (package-source base-rust))
-         ;; see https://github.com/rust-lang/rust/pull/125844
-         (patches (search-patches "rust-1.78-unwinding-fix.patch")))))))
-
-(define-public rust-1.79
-  (let ((base-rust (rust-bootstrapped-package rust-1.78 "1.79.0"
-                    "1h282jb1yxc69999w4nhvqb08rw2jy32i9njdjqrz78zglycybhp")))
-    (package
-      (inherit base-rust)
-      (source
-       (origin
-         (inherit (package-source base-rust))
-         (snippet
-          '(begin
-             (for-each delete-file-recursively
-                       '("src/llvm-project"
-                         "vendor/jemalloc-sys-0.5.4+5.3.0-patched/jemalloc"
-                         "vendor/openssl-src-111.28.1+1.1.1w/openssl"
-                         
"vendor/tikv-jemalloc-sys-0.5.4+5.3.0-patched/jemalloc"))
-             ;; Remove vendored dynamically linked libraries.
-             ;; find . -not -type d -executable -exec file {} \+ | grep ELF
-             ;; Also remove the bundled (mostly Windows) libraries.
-             (for-each delete-file
-                       (find-files "vendor" "\\.(a|dll|exe|lib)$"))
-             ;; Adjust vendored dependency to explicitly use rustix with libc 
backend.
-             (substitute* '("vendor/tempfile-3.7.1/Cargo.toml"
-                            "vendor/tempfile-3.10.1/Cargo.toml")
-               (("features = \\[\"fs\"" all)
-                (string-append all ", \"use-libc\""))))))))))
-
-(define-public rust-1.80
-  (let ((base-rust (rust-bootstrapped-package rust-1.79 "1.80.1"
-                    "1i1dbpwnv6ak244lapsxvd26w6sbas9g4l6crc8bip2275j8y2rc")))
-    (package
-      (inherit base-rust)
-      (source
-       (origin
-         (inherit (package-source base-rust))
-         (snippet
-          '(begin
-             (for-each delete-file-recursively
-                       '("src/llvm-project"
-                         "vendor/jemalloc-sys-0.5.3+5.3.0-patched/jemalloc"
-                         "vendor/jemalloc-sys-0.5.4+5.3.0-patched/jemalloc"
-                         "vendor/openssl-src-111.28.2+1.1.1w/openssl"
-                         
"vendor/tikv-jemalloc-sys-0.5.4+5.3.0-patched/jemalloc"))
-             ;; Remove vendored dynamically linked libraries.
-             ;; find . -not -type d -executable -exec file {} \+ | grep ELF
-             ;; Also remove the bundled (mostly Windows) libraries.
-             (for-each delete-file
-                       (find-files "vendor" "\\.(a|dll|exe|lib)$"))
-             ;; Adjust vendored dependency to explicitly use rustix with libc 
backend.
-             (substitute* '("vendor/tempfile-3.7.1/Cargo.toml"
-                            "vendor/tempfile-3.10.1/Cargo.toml")
-               (("features = \\[\"fs\"" all)
-                (string-append all ", \"use-libc\""))))))))))
-
-(define-public rust-1.81
-  (let ((base-rust (rust-bootstrapped-package rust-1.80 "1.81.0"
-                    "19yggj1qivdhf68gx2652cfi7nxjkdgy39wh7h6facpzppz4h947")))
-    (package
-      (inherit base-rust)
-      (source
-       (origin
-         (inherit (package-source base-rust))
-         ;; see 
https://github.com/rust-lang/rust/issues/129268#issuecomment-2430133779
-         (patches (search-patches 
"rust-1.81-fix-riscv64-bootstrap.patch")))))))
-
-(define-public rust-1.82
-  (let ((base-rust (rust-bootstrapped-package rust-1.81 "1.82.0"
-                    "0ajiryki2aqsg3ydx3nfhrb5i1mmxvasfszs9qblw66skr8g8lvw")))
-    (package
-      (inherit base-rust)
-      (source
-       (origin
-         (inherit (package-source base-rust))
-         (patches '())))
-      (arguments
-       (substitute-keyword-arguments (package-arguments base-rust)
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (replace 'patch-cargo-checksums
-               (lambda _
-                 (substitute* (cons* "Cargo.lock"
-                                     "src/bootstrap/Cargo.lock"
-                                     "library/Cargo.lock"
-                                     (filter
-                                      ;; Don't mess with the lock files in the
-                                      ;; Cargo testsuite; it messes up the 
tests.
-                                      (lambda (path)
-                                        (not (string-contains
-                                               path "cargo/tests/testsuite")))
-                                      (find-files "src/tools" "Cargo.lock")))
-                   (("(checksum = )\".*\"" all name)
-                    (string-append name "\"" ,%cargo-reference-hash "\"")))
-                 (generate-all-checksums "vendor"))))))))))
-
-(define-public rust-1.83
-  (let ((base-rust (rust-bootstrapped-package rust-1.82 "1.83.0"
-                    "0vhwhk4cbyppnz0lcazfjyddyz811fgvadfxswldicpashxpfbbj")))
-    (package
-      (inherit base-rust)
-      (source
-       (origin
-         (inherit (package-source base-rust))
-         (snippet
-          '(begin
-             (for-each delete-file-recursively
-                       '("src/gcc"
-                         "src/llvm-project"
-                         "vendor/jemalloc-sys-0.3.2"
-                         "vendor/jemalloc-sys-0.5.3+5.3.0-patched/jemalloc"
-                         "vendor/jemalloc-sys-0.5.4+5.3.0-patched/jemalloc"
-                         "vendor/openssl-src-111.28.2+1.1.1w/openssl"
-                         
"vendor/tikv-jemalloc-sys-0.5.4+5.3.0-patched/jemalloc"))
-             ;; Remove vendored dynamically linked libraries.
-             ;; find . -not -type d -executable -exec file {} \+ | grep ELF
-             ;; Also remove the bundled (mostly Windows) libraries.
-             (for-each delete-file
-                       (find-files "vendor" "\\.(a|dll|exe|lib)$"))
-             ;; Adjust vendored dependency to explicitly use rustix with libc 
backend.
-             (substitute* '("vendor/tempfile-3.10.1/Cargo.toml"
-                            "vendor/tempfile-3.13.0/Cargo.toml")
-               (("features = \\[\"fs\"" all)
-                (string-append all ", \"use-libc\"")))))))
-      (arguments
-       (substitute-keyword-arguments (package-arguments base-rust)
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'configure 'use-system-llvm
-               (lambda _
-                 (substitute* "config.toml"
-                   (("\\[llvm\\]") "[llvm]\ndownload-ci-llvm = false")
-                   (("\\[rust\\]") "[rust]\ndownload-rustc = false"))))))))
-      ;; Need llvm >= 18.0
-      (inputs (modify-inputs inputs
-                             (replace "llvm" llvm-19))))))
-
-(define-public rust-1.84
-  (rust-bootstrapped-package rust-1.83 "1.84.1"
-   "0xdk3g1xq33fy4m7q6l38ba9ydxbanccyb0vczvlk998jvababsy"))
-
-(define-public rust-1.85
-  (let ((base-rust
-         (rust-bootstrapped-package rust-1.84 "1.85.1"
-                                    
"12i3jkxrc2bbd2d423q7krwkbc39wlwkjacsimx7b61m1359aa8g")))
-    (package
-      (inherit base-rust)
-      (source
-       (origin
-         (inherit (package-source base-rust))
-         (snippet
-          '(begin
-             (for-each delete-file-recursively
-                       '("src/llvm-project"
-                         "vendor/jemalloc-sys-0.3.2"
-                         "vendor/jemalloc-sys-0.5.3+5.3.0-patched/jemalloc"
-                         "vendor/openssl-src-111.28.2+1.1.1w/openssl"
-                         
"vendor/tikv-jemalloc-sys-0.5.4+5.3.0-patched/jemalloc"
-                         
"vendor/tikv-jemalloc-sys-0.6.0+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7/jemalloc"))
-             ;; Remove vendored dynamically linked libraries.
-             ;; find . -not -type d -executable -exec file {} \+ | grep ELF
-             ;; Also remove the bundled (mostly Windows) libraries.
-             (for-each delete-file
-                       (find-files "vendor" "\\.(a|dll|exe|lib)$"))
-             ;; Adjust vendored dependency to explicitly use rustix with libc 
backend.
-             (substitute* '("vendor/tempfile-3.10.1/Cargo.toml"
-                            "vendor/tempfile-3.14.0/Cargo.toml")
-               (("features = \\[\"fs\"" all)
-                (string-append all ", \"use-libc\""))))))))))
-
-(define-public rust-1.86
-  (let ((base-rust
-         (rust-bootstrapped-package
-          rust-1.85 "1.86.0"
-          "107d3vbmwhn4b71gzr1kv31jwwyld7dxj9yj8jh00ygndll2fah2")))
-    (package
-      (inherit base-rust)
-      (source
-       (origin
-         (inherit (package-source base-rust))
-         (snippet
-          '(begin
-             (for-each delete-file-recursively
-                       '("src/llvm-project"
-                         "vendor/jemalloc-sys-0.3.2"
-                         "vendor/jemalloc-sys-0.5.3+5.3.0-patched/jemalloc"
-                         "vendor/openssl-src-111.17.0+1.1.1m/openssl"
-                         "vendor/openssl-src-111.28.2+1.1.1w/openssl"
-                         
"vendor/tikv-jemalloc-sys-0.5.4+5.3.0-patched/jemalloc"
-                         
"vendor/tikv-jemalloc-sys-0.6.0+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7/jemalloc"))
-             ;; Remove vendored dynamically linked libraries.
-             ;; find . -not -type d -executable -exec file {} \+ | grep ELF
-             ;; Also remove the bundled (mostly Windows) libraries.
-             (for-each delete-file
-                       (find-files "vendor" "\\.(a|dll|exe|lib)$"))
-             ;; Adjust vendored dependency to explicitly use rustix with libc 
backend.
-             (substitute* '("vendor/tempfile-3.14.0/Cargo.toml"
-                            "vendor/tempfile-3.15.0/Cargo.toml"
-                            "vendor/tempfile-3.16.0/Cargo.toml")
-               (("features = \\[\"fs\"" all)
-                (string-append all ", \"use-libc\"")))))))
-      (arguments
-       (substitute-keyword-arguments (package-arguments base-rust)
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'use-system-llvm 'disable-lld-wrapper
-               (lambda _
-                 (substitute* "config.toml"
-                   (("\\[rust\\]") "[rust]\nlld = false")))))))))))
-
-(define-public rust-1.87
-  (let ((base-rust
-         (rust-bootstrapped-package rust-1.86 "1.87.0"
-          "0xlfzl24qhs4vlwn7d2hd2zkg6k2y1lgq03rx2j2sndy57yvk6ql")))
-    (package
-      (inherit base-rust)
-      (source
-       (origin
-         (inherit (package-source base-rust))
-         (snippet
-          '(begin
-             (for-each delete-file-recursively
-                       '("src/llvm-project"
-                         "vendor/jemalloc-sys-0.3.2"
-                         "vendor/jemalloc-sys-0.5.3+5.3.0-patched/jemalloc"
-                         "vendor/openssl-src-111.17.0+1.1.1m/openssl"
-                         "vendor/openssl-src-300.4.2+3.4.1/openssl"
-                         
"vendor/tikv-jemalloc-sys-0.5.4+5.3.0-patched/jemalloc"
-                         
"vendor/tikv-jemalloc-sys-0.6.0+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7/jemalloc"))
-             ;; Remove vendored dynamically linked libraries.
-             ;; find . -not -type d -executable -exec file {} \+ | grep ELF
-             ;; Also remove the bundled (mostly Windows) libraries.
-             (for-each delete-file
-                       (find-files "vendor" "\\.(a|dll|exe|lib)$"))
-             ;; Adjust vendored dependency to explicitly use rustix with libc 
backend.
-             (substitute* '("vendor/tempfile-3.14.0/Cargo.toml"
-                            "vendor/tempfile-3.15.0/Cargo.toml"
-                            "vendor/tempfile-3.17.1/Cargo.toml")
-               (("features = \\[\"fs\"" all)
-                (string-append all ", \"use-libc\"")))))))
-      (arguments
-       (substitute-keyword-arguments (package-arguments base-rust)
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (replace 'build
-               ;; Just building stage 1 no longer builds cargo.
-
-               ;; TODO: Try reverting to use "./x.py install rustc std cargo"
-               ;; when Rust 1.91 comes out, which should no longer rebuild
-               ;; things unnecessarily. If this works, the 'post-install'
-               ;; phase carried from earlier should no longer be necessary.
-               (lambda* (#:key parallel-build? #:allow-other-keys)
-                 (let ((job-spec (string-append
-                                   "-j" (if parallel-build?
-                                          (number->string (parallel-job-count))
-                                          "1"))))
-                   (invoke "./x.py" job-spec "build" "--stage=2"
-                           "library/std"
-                           "src/tools/cargo")))))))))))
-
-(define-public rust-1.88
-  (let ((base-rust
-         (rust-bootstrapped-package
-          rust-1.87 "1.88.0"
-          "1gngrxjfqiyybyamzn8s4rfbhk7jss1vrmnijg8y72l46i2595rs")))
-    (package
-      (inherit base-rust)
-      (source
-       (origin
-         (inherit (package-source base-rust))
-         (snippet
-          '(begin
-             (for-each delete-file-recursively
-                       '("src/llvm-project"
-                         "vendor/jemalloc-sys-0.3.2"
-                         "vendor/jemalloc-sys-0.5.3+5.3.0-patched/jemalloc"
-                         "vendor/openssl-src-111.17.0+1.1.1m/openssl"
-                         "vendor/openssl-src-300.4.2+3.4.1/openssl"
-                         
"vendor/tikv-jemalloc-sys-0.5.4+5.3.0-patched/jemalloc"
-                         
"vendor/tikv-jemalloc-sys-0.6.0+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7/jemalloc"))
-             ;; Remove vendored dynamically linked libraries.
-             ;; find . -not -type d -executable -exec file {} \+ | grep ELF
-             ;; Also remove the bundled (mostly Windows) libraries.
-             (for-each delete-file
-                       (find-files "vendor" "\\.(a|dll|exe|lib)$"))
-             ;; Adjust vendored dependency to explicitly use rustix with libc 
backend.
-             (substitute* '("vendor/tempfile-3.14.0/Cargo.toml"
-                            "vendor/tempfile-3.17.1/Cargo.toml"
-                            "vendor/tempfile-3.19.0/Cargo.toml"
-                            "vendor/tempfile-3.19.1/Cargo.toml")
-               (("features = \\[\"fs\"" all)
-                (string-append all ", \"use-libc\""))))))))))
-
-(define-public rust-1.89
-  (let ((base-rust
-         (rust-bootstrapped-package
-          rust-1.88 "1.89.0"
-          "0395ax8d138ch65fzm1y9xf2s4661am5k3yj3cav16fx83sgjxi5")))
-    (package
-      (inherit base-rust)
-      (source
-       (origin
-         (inherit (package-source base-rust))
-         (snippet
-          '(begin
-             (for-each delete-file-recursively
-                       '("src/llvm-project"
-                         "vendor/curl-sys-0.4.79+curl-8.12.0/curl"
-                         "vendor/curl-sys-0.4.80+curl-8.12.1/curl"
-                         "vendor/curl-sys-0.4.82+curl-8.14.1/curl"
-                         "vendor/jemalloc-sys-0.5.3+5.3.0-patched/jemalloc"
-                         "vendor/jemalloc-sys-0.5.4+5.3.0-patched/jemalloc"
-                         "vendor/libffi-sys-3.3.1/libffi"
-                         "vendor/libz-sys-1.1.21/src/zlib"
-                         "vendor/libz-sys-1.1.22/src/zlib"
-                         "vendor/libmimalloc-sys-0.1.42/c_src/mimalloc"
-                         "vendor/openssl-src-111.28.2+1.1.1w/openssl"
-                         "vendor/openssl-src-300.5.0+3.5.0/openssl"
-                         
"vendor/tikv-jemalloc-sys-0.5.4+5.3.0-patched/jemalloc"
-                         "vendor/tikv-jemalloc-sys-0.6.0+5.3.0-1-\
-ge13ca993e8ccb9ba9847cc330696e02839f328f7/jemalloc"))
-             ;; Remove vendored dynamically linked libraries.
-             ;; find . -not -type d -executable -exec file {} \+ | grep ELF
-             ;; Also remove the bundled (mostly Windows) libraries.
-             (for-each delete-file
-                       (find-files "vendor" "\\.(a|dll|exe|lib)$"))
-             ;; Use the packaged nghttp2.
-             (for-each
-              (lambda (ver)
-                (let ((vendored-dir
-                       (format #f "vendor/libnghttp2-sys-~a/nghttp2" ver))
-                      (build-rs
-                       (format #f "vendor/libnghttp2-sys-~a/build.rs" ver)))
-                  (delete-file-recursively vendored-dir)
-                  (delete-file build-rs)
-                  (call-with-output-file build-rs
-                    (lambda (port)
-                      (format port "fn main() {~@
-                         println!(\"cargo:rustc-link-lib=nghttp2\");~@
-                         }~%")))))
-              '("0.1.11+1.64.0"))
-             ;; Adjust vendored dependency to explicitly use rustix with libc
-             ;; backend.
-             (substitute* '("vendor/tempfile-3.14.0/Cargo.toml"
-                            "vendor/tempfile-3.16.0/Cargo.toml"
-                            "vendor/tempfile-3.19.0/Cargo.toml"
-                            "vendor/tempfile-3.19.1/Cargo.toml"
-                            "vendor/tempfile-3.20.0/Cargo.toml")
-               (("features = \\[\"fs\"" all)
-                (string-append all ", \"use-libc\"")))))))
-      (inputs
-       (modify-inputs inputs
-         (prepend curl `(,nghttp2 "lib") libffi))))))
-
-(define-public rust-1.90
-  (let ((base-rust
-         (rust-bootstrapped-package
-          rust-1.89 "1.90.0"
-          "0zlv3ybd8za07brxwj4n03cma1snnpvbqj0h0wg3bmafpaf9z6kr")))
-    (package
-      (inherit base-rust)
-      (source
-       (origin
-         (inherit (package-source base-rust))
-         (snippet
-          '(begin
-             (for-each delete-file-recursively
-                       '("src/llvm-project"
-                         "vendor/curl-sys-0.4.79+curl-8.12.0/curl"
-                         "vendor/curl-sys-0.4.82+curl-8.14.1/curl"
-                         "vendor/jemalloc-sys-0.5.3+5.3.0-patched/jemalloc"
-                         "vendor/jemalloc-sys-0.5.4+5.3.0-patched/jemalloc"
-                         "vendor/libffi-sys-3.3.2/libffi"
-                         "vendor/libz-sys-1.1.21/src/zlib"
-                         "vendor/libz-sys-1.1.22/src/zlib"
-                         "vendor/libmimalloc-sys-0.1.42/c_src/mimalloc"
-                         "vendor/openssl-src-111.28.2+1.1.1w/openssl"
-                         "vendor/openssl-src-300.5.0+3.5.0/openssl"
-                         
"vendor/tikv-jemalloc-sys-0.5.4+5.3.0-patched/jemalloc"
-                         "vendor/tikv-jemalloc-sys-0.6.0+5.3.0-1-\
-ge13ca993e8ccb9ba9847cc330696e02839f328f7/jemalloc"))
-             ;; Remove vendored dynamically linked libraries.
-             ;; find . -not -type d -executable -exec file {} \+ | grep ELF
-             ;; Also remove the bundled (mostly Windows) libraries.
-             (for-each delete-file
-                       (find-files "vendor" "\\.(a|dll|exe|lib)$"))
-             ;; Use the packaged nghttp2.
-             (for-each
-              (lambda (ver)
-                (let ((vendored-dir
-                       (format #f "vendor/libnghttp2-sys-~a/nghttp2" ver))
-                      (build-rs
-                       (format #f "vendor/libnghttp2-sys-~a/build.rs" ver)))
-                  (delete-file-recursively vendored-dir)
-                  (delete-file build-rs)
-                  (call-with-output-file build-rs
-                    (lambda (port)
-                      (format port "fn main() {~@
-                         println!(\"cargo:rustc-link-lib=nghttp2\");~@
-                         }~%")))))
-              '("0.1.11+1.64.0"))
-             ;; Adjust vendored dependency to explicitly use rustix with libc
-             ;; backend.
-             (substitute* '("vendor/tempfile-3.14.0/Cargo.toml"
-                            "vendor/tempfile-3.16.0/Cargo.toml"
-                            "vendor/tempfile-3.19.0/Cargo.toml"
-                            "vendor/tempfile-3.19.1/Cargo.toml"
-                            "vendor/tempfile-3.20.0/Cargo.toml")
-               (("features = \\[\"fs\"" all)
-                (string-append all ", \"use-libc\"")))))))
-      (inputs
-       (modify-inputs inputs
-         (replace "llvm" llvm-21))))))
-
 (define-public rust-1.91
   (package
     (name "rust")

Reply via email to