chore(deps): Update Rust Stable to v1.91 #590
                
     Open
            
            
          
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
This PR contains the following updates:
1.87->1.91Release Notes
rust-lang/rust (STABLE)
v1.91Compare Source
==========================
Language
sysv64,win64,efiapi, andaapcsABIs.This brings these ABIs in line with the C ABI: variadic functions can be declared in extern blocks but not defined.
dangling_pointers_from_localslint to warn against dangling pointers from local variablessemicolon_in_expressions_from_macrosfrom warn to denyinteger_to_ptr_transmuteslint against integer-to-pointer transmutessse4aandtbmtarget featurestarget_env = "macabi"andtarget_env = "sim"cfgs as replacements for thetarget_abicfgs with the same values.Compiler
ascasts as unreachablePlatform Support
aarch64-pc-windows-gnullvmandx86_64-pc-windows-gnullvmto Tier 2 with host tools.Note: llvm-tools and MSI installers are missing but will be added in future releases.
aarch64-pc-windows-msvcto Tier 1Refer to Rust's platform support page
for more information on Rust's tiered platform support.
Libraries
core::panic::Location::filereturn type_by()variants ofmin/max/minmaxinstd::cmpCloneandEqtraitsstd::thread: Return error if setting thread stack size failsThis used to panic within the standard library.
Stabilized APIs
Path::file_prefixAtomicPtr::fetch_ptr_addAtomicPtr::fetch_ptr_subAtomicPtr::fetch_byte_addAtomicPtr::fetch_byte_subAtomicPtr::fetch_orAtomicPtr::fetch_andAtomicPtr::fetch_xor{integer}::strict_add{integer}::strict_sub{integer}::strict_mul{integer}::strict_div{integer}::strict_div_euclid{integer}::strict_rem{integer}::strict_rem_euclid{integer}::strict_neg{integer}::strict_shl{integer}::strict_shr{integer}::strict_powi{N}::strict_add_unsignedi{N}::strict_sub_unsignedi{N}::strict_absu{N}::strict_add_signedu{N}::strict_sub_signedPanicHookInfo::payload_as_strcore::iter::chainu{N}::checked_signed_diffcore::array::repeatPathBuf::add_extensionPathBuf::with_added_extensionDuration::from_minsDuration::from_hoursimpl PartialEq<str> for PathBufimpl PartialEq<String> for PathBufimpl PartialEq<str> for Pathimpl PartialEq<String> for Pathimpl PartialEq<PathBuf> for Stringimpl PartialEq<Path> for Stringimpl PartialEq<PathBuf> for strimpl PartialEq<Path> for strIpv4Addr::from_octetsIpv6Addr::from_octetsIpv6Addr::from_segmentsimpl<T> Default for Pin<Box<T>> where Box<T>: Default, T: ?Sizedimpl<T> Default for Pin<Rc<T>> where Rc<T>: Default, T: ?Sizedimpl<T> Default for Pin<Arc<T>> where Arc<T>: Default, T: ?SizedCell::as_array_of_cellsu{N}::carrying_addu{N}::borrowing_subu{N}::carrying_mulu{N}::carrying_mul_addBTreeMap::extract_ifBTreeSet::extract_ifimpl Debug for windows::ffi::EncodeWide<'_>str::ceil_char_boundarystr::floor_char_boundaryimpl Sum for Saturating<u{N}>impl Sum<&Self> for Saturating<u{N}>impl Product for Saturating<u{N}>impl Product<&Self> for Saturating<u{N}>These previously stable APIs are now stable in const contexts:
<[T; N]>::each_ref<[T; N]>::each_mutOsString::newPathBuf::newTypeId::ofptr::with_exposed_provenanceptr::with_exposed_provenance_mutCargo
build.build-dir.This config sets the directory where intermediate build artifacts are stored.
These artifacts are produced by Cargo and rustc during the build process.
End users usually won't need to interact with them, and the layout inside
build-diris an implementation detail that may change without notice.(config doc)
(build cache doc)
#15833
#15840
--targetflag and thebuild.targetconfiguration can now take literal"host-tuple"string, which will internally be substituted by the hostmachine's target triple.
#15838
#16003
#16032
Rustdoc
*const u8 ->, and additionally functions that take or return raw pointers will now display their signature properly in search results.Compatibility Notes
cc, and pass it viaSDKROOTenv var. This should fix linking issues withrustcrunning inside Xcode. Libraries in/usr/local/libmay no longer be linked automatically, if you develop or use a crate that relies on this, you should explicitly setcargo::rustc-link-search=/usr/local/libin abuild.rsscript.TraitRef<AssocTy: ?Sized>are now correctly forbidden#[sanitize(xyz = "on|off")]built-in attribute that shadows procedural macros with the same name#[should_panic]attributes#[link]attributessemicolon_in_expressions_from_macros, formacro_rules!macros in expression position that expand to end in a semicolon (;), is now deny-by-default. It was already warn-by-default, and a future compatibility warning (FCW) that warned even in dependencies. This lint will become a hard error in the future.unsafe,!,default) in inherent impls are no longer syntactically validill_formed_attribute_inputin dependenciespin!,format_args!,write!, andwriteln!inif letscrutinees in Rust Edition 2024. This applies Rust Edition 2024'sif lettemporary scope rules to these temporaries, which previously could live past theifexpression regardless of Edition.staticare now syntactically invalid--cfgand--check-cfgarguments are no longer allowedCargo compatibility notes:
cargo publishno longer keeps.cratetarballs as final build artifactswhen
build.build-diris set. These tarballs were previously included due toan oversight and are now treated as intermediate artifacts.
To get
.cratetarballs as final artifacts, usecargo package.In a future version, this change will apply regardless of
build.build-dir.#15910
This changes some of the terminal colors used by Cargo messages.
#15928
internal details of Cargo's
build-dirmay not work for users changing their
build-dirlayout.For those doing so, we'd recommend proactively testing these cases
particularly as we are considering changing the default location of the
build-dirin the future(cargo#16147).
If you can't migrate off of Cargo's internal details,
we'd like to learn more about your use case as we prepare to change the layout of the
build-dir(cargo#15010).
Internal Changes
These changes do not affect any public interfaces of Rust, but they represent
significant improvements to the performance or internals of rustc and related
tools.
v1.90Compare Source
===========================
Language
unknown_or_malformed_diagnostic_attributeslint. This lint has been split up into four finer-grained lints, withunknown_or_malformed_diagnostic_attributesnow being the lint group that contains these lints:unknown_diagnostic_attributes: unknown to the current compilermisplaced_diagnostic_attributes: placed on the wrong itemmalformed_diagnostic_attributes: malformed attribute syntax or optionsmalformed_diagnostic_format_literals: malformed format string literalCompiler
lldby default onx86_64-unknown-linux-gnu.musltargets now link dynamically by default. Affected targets:mips64-unknown-linux-muslabi64powerpc64-unknown-linux-muslpowerpc-unknown-linux-muslpowerpc-unknown-linux-muslsperiscv32gc-unknown-linux-musls390x-unknown-linux-muslthumbv7neon-unknown-linux-musleabihfPlatform Support
x86_64-apple-darwinto Tier 2 with host toolsRefer to Rust's platform support page
for more information on Rust's tiered platform support.
Libraries
u*::{checked,overflowing,saturating,wrapping}_sub_signedCStr,CString, andCow<CStr>MSG_NOSIGNALforUnixStreamproc_macro::Ident::newnow supports$crate.Thread::into_rawhas at least 8 bytes of alignmentStabilized APIs
u{n}::checked_sub_signedu{n}::overflowing_sub_signedu{n}::saturating_sub_signedu{n}::wrapping_sub_signedimpl Copy for IntErrorKindimpl Hash for IntErrorKindimpl PartialEq<&CStr> for CStrimpl PartialEq<CString> for CStrimpl PartialEq<Cow<CStr>> for CStrimpl PartialEq<&CStr> for CStringimpl PartialEq<CStr> for CStringimpl PartialEq<Cow<CStr>> for CStringimpl PartialEq<&CStr> for Cow<CStr>impl PartialEq<CStr> for Cow<CStr>impl PartialEq<CString> for Cow<CStr>These previously stable APIs are now stable in const contexts:
<[T]>::reversef32::floorf32::ceilf32::truncf32::fractf32::roundf32::round_ties_evenf64::floorf64::ceilf64::truncf64::fractf64::roundf64::round_ties_evenCargo
http.proxy-cainfoconfig for proxy certsgixforcargo packageRustdoc
implblocks, now they do when shift is heldunsafe()wrappersCompatibility Notes
lldby default onx86_64-unknown-linux-gnu.See also https://blog.rust-lang.org/2025/09/01/rust-lld-on-1.90.0-stable/.
core::iter::Fuse'sDefaultimpl constructI::default()internally as promised in the docs instead of always being emptyMSG_NOSIGNALforUnixStreamThis may change program behavior but results in the same behavior as other primitives (e.g., stdout, network sockets).
Programs relying on signals to terminate them should update handling of sockets to handle errors on write by exiting.
std::env::home_dirwill use the fallback if theHOMEenvironment variable is emptyextern "{abi}"s consistently in all positions. This primarily affects the use of implementing traits on anextern "{abi}"function pointer, likeextern "stdcall" fn(), on a platform that doesn't support that, like aarch64-unknown-linux-gnu. Direct usage of these unsupported ABI strings by declaring or defining functions was already rejected, so this is only a change for consistency.proc_macro_derivemacro has correct arguments when applied to the crate rootv1.89Compare Source
==========================
Language
feature(generic_arg_infer))mismatched_lifetime_syntaxeslint.This lint detects when the same lifetime is referred to by different syntax categories between function arguments and return values, which can be confusing to read, especially in unsafe code.
This lint supersedes the warn-by-default
elided_named_lifetimeslint.unpredictable_function_pointer_comparisonsto also lint on function pointer comparisons in external macrosdangerous_implicit_autorefslint deny-by-defaultklandwidekltarget features for x86sha512,sm3andsm4target features for x86f,d,frecipe,lasx,lbt,lsx, andlvzi128andu128fromimproper_ctypes_definitionsrepr128(#[repr(u128)],#[repr(i128)])#![doc(test(attr(..)))]everywhereextern "C"functions on thewasm32-unknown-unknowntarget now have a standards compliant ABICompiler
Platform Support
loongarch32-unknown-noneandloongarch32-unknown-none-softfloatx86_64-apple-darwinis in the process of being demoted to Tier 2 with host toolsRefer to Rust's platform support page
for more information on Rust's tiered platform support.
Libraries
file!format_args!()in a variable#[must_use]to[T; N]::mapDerefMutforLazy{Cell,Lock}Defaultforarray::IntoIterCloneforslice::ChunkByio::Seekforio::TakeStabilized APIs
NonZero<char>SHA512,SM3andSM4intrinsicsFile::lockFile::lock_sharedFile::try_lockFile::try_lock_sharedFile::unlockNonNull::from_refNonNull::from_mutNonNull::without_provenanceNonNull::with_exposed_provenanceNonNull::expose_provenanceOsString::leakPathBuf::leakResult::flattenstd::os::linux::net::TcpStreamExt::quickackstd::os::linux::net::TcpStreamExt::set_quickackThese previously stable APIs are now stable in const contexts:
<[T; N]>::as_mut_slice<[u8]>::eq_ignore_ascii_casestr::eq_ignore_ascii_caseCargo
cargo fixandcargo clippy --fixnow default to the same Cargo target selection as other build commands. Previously it would apply to all targets (like binaries, examples, tests, etc.). The--editionflag still applies to all targets.runnersetting to run the tests. If you need to disable tests for a target, you can use the ignore doctest attribute to specify the targets to ignore.Rustdoc
Compatibility Notes
missing_fragment_specifieran unconditional errorneontarget feature onaarch64-unknown-none-softfloatcauses a warning because mixing code with and without that target feature is not properly supported by LLVM?Sizedbounds on impls on recursive types which contain associated type projections. It is not expected to affect any existing published crates. Can be fixed by refactoring the involved types or opting into thesized_hierarchyunstable feature. See the FCP report for a code example.elided_named_lifetimeslint is superseded by the warn-by-defaultmismatched_lifetime_syntaxeslint.Copyare now only available at the end of type checkingstd::intrinsics::{copy,copy_nonoverlapping,write_bytes}are now proper intrinsics. There are no debug assertions guarding against UB, and they cannot be coerced to function pointers.std::intrinsics::drop_in_place!) are now reported in dependenciesstd::ptr::copy_*intrinsics also perform the static self-init checksextern "C"functions on thewasm32-unknown-unknowntarget now have a standards compliant ABIInternal Changes
These changes do not affect any public interfaces of Rust, but they represent
significant improvements to the performance or internals of rustc and related
tools.
rustc-devcomponentv1.88Compare Source
==========================
Language
#![feature(let_chains)]in the 2024 edition.This feature allows
&&-chainingletstatements insideifandwhile, allowing intermixture with boolean expressions. The patterns inside theletsub-expressions can be irrefutable or refutable.#![feature(naked_functions)].Naked functions allow writing functions with no compiler-generated epilogue and prologue, allowing full control over the generated assembly for a particular function.
#![feature(cfg_boolean_literals)].This allows using boolean literals as
cfgpredicates, e.g.#[cfg(true)]and#[cfg(false)].#[bench]attribute. Usage of#[bench]without#![feature(custom_test_frameworks)]already triggered a deny-by-default future-incompatibility lint since Rust 1.77, but will now become a hard error.dangerous_implicit_autorefslint against implicit autoref of raw pointer dereference.The lint will be bumped to deny-by-default in the next version of Rust.
invalid_null_argumentslint to prevent invalid usage of null pointers.This lint is uplifted from
clippy::invalid_null_ptr_usage.Compiler
-Cdwarf-versionfor selecting the version of DWARF debug information to generate.Platform Support
i686-pc-windows-gnuto Tier 2.Refer to Rust's platform support page
for more information on Rust's tiered platform support.
Libraries
#[should_panic]test failure message.[T; N]::from_fnis generated in order of increasing indices., for those passing it a stateful closure.--nocaptureis deprecated in favor of the more consistent--no-captureflag.{float}::NANis a quiet NaN.Stabilized APIs
Cell::updateimpl Default for *const Timpl Default for *mut THashMap::extract_ifHashSet::extract_ifhint::select_unpredictableproc_macro::Span::lineproc_macro::Span::columnproc_macro::Span::startproc_macro::Span::endproc_macro::Span::fileproc_macro::Span::local_file<[T]>::as_chunks<[T]>::as_chunks_mut<[T]>::as_chunks_unchecked<[T]>::as_chunks_unchecked_mut<[T]>::as_rchunks<[T]>::as_rchunks_mutmod ffi::c_strThese previously stable APIs are now stable in const contexts:
NonNull<T>::replace<*mut T>::replacestd::ptr::swap_nonoverlappingCell::replaceCell::getCell::get_mutCell::from_mutCell::as_slice_of_cellsCargo
zlib-rsfor gzip compression in rust codeRustdoc
ignore-*attributes.--test-runtooland--test-runtool-argCLI options to specify a program (like qemu) and its arguments to run a doctest.Compatibility Notes
ttfragment specifier can often fix these macros.#[bench]attribute. Usage of#[bench]without#![feature(custom_test_frameworks)]already triggered a deny-by-default future-incompatibility lint since Rust 1.77, but will now become a hard error.The borrow checker was overly permissive in some cases, allowing programs that shouldn't have compiled.
Configuration
📅 Schedule: Branch creation - Every minute ( * * * * * ) (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.