From 413597cc4695bb32f05168693b823b06ec9109e0 Mon Sep 17 00:00:00 2001 From: tranzystorekk Date: Wed, 19 Mar 2025 13:42:33 +0100 Subject: [PATCH] rust: update to 1.85.1 --- .../0016-fix-rustdoc-on-arm-targets.patch | 97 ------------------- srcpkgs/rust/template | 4 +- 2 files changed, 2 insertions(+), 99 deletions(-) delete mode 100644 srcpkgs/rust/patches/0016-fix-rustdoc-on-arm-targets.patch diff --git a/srcpkgs/rust/patches/0016-fix-rustdoc-on-arm-targets.patch b/srcpkgs/rust/patches/0016-fix-rustdoc-on-arm-targets.patch deleted file mode 100644 index 9239c72b040..00000000000 --- a/srcpkgs/rust/patches/0016-fix-rustdoc-on-arm-targets.patch +++ /dev/null @@ -1,97 +0,0 @@ -Ported from https://github.com/rust-lang/rust/pull/137632 - -diff --git a/compiler/rustc_codegen_ssa/src/target_features.rs b/compiler/rustc_codegen_ssa/src/target_features.rs -index 7e80d014e..4d1c10bbc 100644 ---- a/compiler/rustc_codegen_ssa/src/target_features.rs -+++ b/compiler/rustc_codegen_ssa/src/target_features.rs -@@ -62,24 +62,26 @@ pub(crate) fn from_target_feature_attr( - return None; - }; - -- // Only allow target features whose feature gates have been enabled -- // and which are permitted to be toggled. -- if let Err(reason) = stability.toggle_allowed(/*enable*/ true) { -- tcx.dcx().emit_err(errors::ForbiddenTargetFeatureAttr { -- span: item.span(), -- feature, -- reason, -- }); -- } else if let Some(nightly_feature) = stability.requires_nightly() -- && !rust_features.enabled(nightly_feature) -- { -- feature_err( -- &tcx.sess, -- nightly_feature, -- item.span(), -- format!("the target feature `{feature}` is currently unstable"), -- ) -- .emit(); -+ if !tcx.sess.opts.actually_rustdoc { -+ // Only allow target features whose feature gates have been enabled -+ // and which are permitted to be toggled. -+ if let Err(reason) = stability.toggle_allowed(/*enable*/ true) { -+ tcx.dcx().emit_err(errors::ForbiddenTargetFeatureAttr { -+ span: item.span(), -+ feature, -+ reason, -+ }); -+ } else if let Some(nightly_feature) = stability.requires_nightly() -+ && !rust_features.enabled(nightly_feature) -+ { -+ feature_err( -+ &tcx.sess, -+ nightly_feature, -+ item.span(), -+ format!("the target feature `{feature}` is currently unstable"), -+ ) -+ .emit(); -+ } - } - Some(Symbol::intern(feature)) - })); -@@ -149,9 +151,42 @@ pub(crate) fn provide(providers: &mut Providers) { - assert_eq!(cnum, LOCAL_CRATE); - let target = &tcx.sess.target; - if tcx.sess.opts.actually_rustdoc { -- // rustdoc needs to be able to document functions that use all the features, so -- // whitelist them all -- rustc_target::target_features::all_rust_features() -+ // HACK: rustdoc would like to pretend that we have all the target features, so we -+ // have to merge all the lists into one. To ensure an unstable target never prevents -+ // a stable one from working, we merge the stability info of all instances of the -+ // same target feature name, with the "most stable" taking precedence. And then we -+ // hope that this doesn't cause issues anywhere else in the compiler... -+ use target_features::StabilityUncomputed; -+ use rustc_data_structures::fx::FxHashMap; -+ let mut result: FxHashMap = Default::default(); -+ for (name, stability) in rustc_target::target_features::all_rust_features() { -+ use std::collections::hash_map::Entry; -+ match result.entry(name.to_owned()) { -+ Entry::Vacant(vacant_entry) => { -+ vacant_entry.insert(stability); -+ } -+ Entry::Occupied(mut occupied_entry) => { -+ // Merge the two stabilities, "more stable" taking precedence. -+ match (occupied_entry.get(), &stability) { -+ (StabilityUncomputed::Stable { .. }, _) -+ | ( -+ StabilityUncomputed::Unstable { .. }, -+ StabilityUncomputed::Unstable { .. } | StabilityUncomputed::Forbidden { .. }, -+ ) -+ | (StabilityUncomputed::Forbidden { .. }, StabilityUncomputed::Forbidden { .. }) => { -+ // The stability in the entry is at least as good as the new one, just keep it. -+ } -+ _ => { -+ // Overwrite stabilite. -+ occupied_entry.insert(stability.clone()); -+ } -+ } -+ } -+ } -+ } -+ #[allow(rustc::potential_query_instability)] -+ result -+ .iter() - .map(|(a, b)| (a.to_string(), b.compute_toggleability(target))) - .collect() - } else { diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template index 053bec0eb80..79cfdbd1bd1 100644 --- a/srcpkgs/rust/template +++ b/srcpkgs/rust/template @@ -8,7 +8,7 @@ # uploaded to https://repo-default.voidlinux.org/distfiles/ # pkgname=rust -version=1.85.0 +version=1.85.1 revision=1 _llvmver=19 hostmakedepends="curl pkg-config python3 tar cargo-bootstrap" @@ -19,7 +19,7 @@ maintainer="Enno Boland " license="Apache-2.0 OR MIT" homepage="https://www.rust-lang.org/" distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz" -checksum=2f4f3142ffb7c8402139cfa0796e24baaac8b9fd3f96b2deec3b94b4045c6a8a +checksum=0f2995ca083598757a8d9a293939e569b035799e070f419a686b0996fb94238a lib32disabled=yes make_check=no # CBA for now python_version=3 # needed for python files in rust-src