This repository was archived by the owner on Mar 24, 2025. It is now read-only.
Update Rust to v1.85.1 #123
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.82.0->1.85.11.82.0@sha256:33a0ea4769482be860174e1139c457bdcb2a236a988580a28c3a48824cbc17d6->1.85.11.82.0->1.85.1Release Notes
rust-lang/rust (rust)
v1.85.1Compare Source
v1.85.0Compare Source
==========================
Language
See the edition guide for more details.
See RFC 3668 for more details.
#[diagnostic::do_not_recommend]unpredictable_function_pointer_comparisonslint to warn against function pointer comparisons#[no_mangle]and#[export_name]attributes.Compiler
-Zpolymorphizehas been removed, see https://github.com/rust-lang/compiler-team/issues/810 for some background.Platform Support
powerpc64le-unknown-linux-muslto tier 2 with host toolsRefer to Rust's [platform support page][platform-support-doc]
for more information on Rust's tiered platform support.
Libraries
Panics in the standard library now have a leading
library/in their pathstd::env::home_dir()on Windows now ignores the non-standard$HOMEenvironment variableIt will be un-deprecated in a subsequent release.
Add
AsyncFn*to the prelude in all editions.Stabilized APIs
BuildHasherDefault::newptr::fn_addr_eqio::ErrorKind::QuotaExceededio::ErrorKind::CrossesDevices{float}::midpoint{integer}::midpointNonZeroU*::midpointstd::iter::Extendfor tuples with arity 1 through 12FromIterator<(A, ...)>for tuples with arity 1 through 12std::task::Waker::noopThese APIs are now stable in const contexts:
mem::size_of_valmem::align_of_valLayout::for_valueLayout::align_toLayout::pad_to_alignLayout::extendLayout::arraystd::mem::swapstd::ptr::swapNonNull::newHashMap::with_hasherHashSet::with_hasherBuildHasherDefault::new<float>::recip<float>::to_degrees<float>::to_radians<float>::max<float>::min<float>::clamp<float>::abs<float>::signum<float>::copysignMaybeUninit::writeCargo
CARGO_CFG_FEATUREto build scriptsRustdoc
Compatibility Notes
rustcno longer treats thetestcfg as a well known check-cfg, instead it is up to the build systems and users of--check-cfg[^check-cfg] to set it as a well known cfg using--check-cfg=cfg(test).This is done to enable build systems like Cargo to set it conditionally, as not all source files are suitable for unit tests.
Cargo (for now) unconditionally sets the
testcfg as a well known cfg.[^check-cfg]: https://doc.rust-lang.org/nightly/rustc/check-cfg.html
Disable potentially incorrect type inference if there are trivial and non-trivial where-clauses
std::env::home_dir()has been deprecated for years, because it can give surprising results in some Windows configurations if theHOMEenvironment variable is set (which is not the normal configuration on Windows). We had previously avoided changing its behavior, out of concern for compatibility with code depending on this non-standard configuration. Given how long this function has been deprecated, we're now fixing its behavior as a bugfix. A subsequent release will remove the deprecation for this function.Make
core::ffi::c_charsignedness more closely match that of the platform-defaultcharThis changed
c_charfrom ani8tou8or vice versa on many Tier 2 and 3targets (mostly Arm and RISC-V embedded targets). The new definition may
result in compilation failures but fixes compatibility issues with C.
The
libccrate matches this change as of its 0.2.169 release.When compiling a nested
macro_rulesmacro from an external crate, the content of the innermacro_rulesis now built with the edition of the external crate, not the local crate.Increase
sparcv9-sun-solarisandx86_64-pc-solarisSolaris baseline to 11.4.Show
abi_unsupported_vector_typeslint in future breakage reportsError if multiple super-trait instantiations of
dyn Traitneed associated types to be specified but only one is providedChange
powerpc64-ibm-aixdefaultcodemodelto largeInternal 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.
x86_64-unknown-linux-gnuwith LTO for C/C++ code (e.g.,jemalloc)v1.84.1Compare Source
==========================
llvm-objcopyif llvm tools are enabled.v1.84.0Compare Source
==========================
Language
#[deny]inside#[forbid]as a no-op-Ctarget-featureis used to toggle features that can lead to unsoundness due to ABI mismatches/as the path separator forinclude!()in all cases on Windowsraw (const|mut)) of a deref of a pointer (*ptr) is now safeextern "C"functionCompiler
--print host-tupleflag to print the host target tuple and affirm the "target tuple" terminology over "target triple"loongarch64-unknown-linux-{musl,ohos}unexpected_cfgslint to also warn in external macrosmultivalue,reference-types, andtail-calltarget featureswasm32v1-nonetargetLibraries
From<&mut {slice}>forBox/Rc/Arc<{slice}><float>::copysign,<float>::abs,<float>::signumtocoreLowerExpandUpperExpimplementations toNonZeroFromStrforCStringandTryFrom<CString>forStringstd::os::darwinhas been made publicStabilized APIs
Ipv6Addr::is_unique_localIpv6Addr::is_unicast_link_localcore::ptr::with_exposed_provenancecore::ptr::with_exposed_provenance_mut<ptr>::addr<ptr>::expose_provenance<ptr>::with_addr<ptr>::map_addr<int>::isqrt<int>::checked_isqrt<uint>::isqrtNonZero::isqrtcore::ptr::without_provenancecore::ptr::without_provenance_mutcore::ptr::danglingcore::ptr::dangling_mutPin::as_deref_mutThese APIs are now stable in const contexts
AtomicBool::from_ptrAtomicPtr::from_ptrAtomicU8::from_ptrAtomicU16::from_ptrAtomicU32::from_ptrAtomicU64::from_ptrAtomicUsize::from_ptrAtomicI8::from_ptrAtomicI16::from_ptrAtomicI32::from_ptrAtomicI64::from_ptrAtomicIsize::from_ptr<ptr>::is_null<ptr>::as_ref<ptr>::as_mutPin::newPin::new_uncheckedPin::get_refPin::into_refPin::get_mutPin::get_unchecked_mutPin::static_refPin::static_mutCargo
Rustdoc
Compatibility Notes
LSXtarget feature for LoongArch Linux targets-Zprofileflag (“gcov-style” coverage instrumentation) has been removed. This does not affect the stable flags for coverage instrumentation (-Cinstrument-coverage) and profile-guided optimization (-Cprofile-generate,-Cprofile-use), which are unrelated and remain available.wasm32-wasihas been removed as the target is now namedwasm32-wasip1. This completes the transition plan for this target following the introduction ofwasm32-wasip1in Rust 1.78. Compiler warnings on use ofwasm32-wasiintroduced in Rust 1.81 are now gone as well as the target is removed.&pin (mut|const) Tis now parsed as a type which in theory could affect macro expansion results in some edge casesstd::archfunctions is no longer permitted to declare items or bodies (such as closures, inline consts, or async blocks).v1.83.0Compare Source
==========================
Language
&mut,*mut,&Cell, and*const Cellin const.constinitializers.'r#ident).!const externfunctions can now be defined for other calling conventions.expr_2021macro fragment specifier in all editions.non_local_definitionslint now fires on less code and warns by default.Compiler
-Csoft-floatflag.aarch64_unknown_nto_qnx700arm64e-apple-tvosarmv7-rtems-eabihfloongarch64-unknown-linux-ohosriscv32-wrs-vxworksandriscv64-wrs-vxworksriscv32{e|em|emc}-unknown-none-elfx86_64-unknown-hurd-gnux86_64-unknown-trustyRefer to Rust's [platform support page][platform-support-doc]
for more information on Rust's tiered platform support.
Libraries
PartialEqforExitCode.catch_unwindcan deal with foreign exceptions without UB, although the exact behavior is unspecified.DefaultforHashMap/HashSetiterators that don't already have it.ptr::add/subto not claim equivalence withoffset.Stabilized APIs
BufRead::skip_untilControlFlow::break_valueControlFlow::continue_valueControlFlow::map_breakControlFlow::map_continueDebugList::finish_non_exhaustiveDebugMap::finish_non_exhaustiveDebugSet::finish_non_exhaustiveDebugTuple::finish_non_exhaustiveErrorKind::ArgumentListTooLongErrorKind::DeadlockErrorKind::DirectoryNotEmptyErrorKind::ExecutableFileBusyErrorKind::FileTooLargeErrorKind::HostUnreachableErrorKind::IsADirectoryErrorKind::NetworkDownErrorKind::NetworkUnreachableErrorKind::NotADirectoryErrorKind::NotSeekableErrorKind::ReadOnlyFilesystemErrorKind::ResourceBusyErrorKind::StaleNetworkFileHandleErrorKind::StorageFullErrorKind::TooManyLinksOption::get_or_insert_defaultWaker::dataWaker::newWaker::vtablechar::MINhash_map::Entry::insert_entryhash_map::VacantEntry::insert_entryThese APIs are now stable in const contexts:
Cell::into_innerDuration::as_secs_f32Duration::as_secs_f64Duration::div_duration_f32Duration::div_duration_f64MaybeUninit::as_mut_ptrNonNull::as_mutNonNull::copy_fromNonNull::copy_from_nonoverlappingNonNull::copy_toNonNull::copy_to_nonoverlappingNonNull::slice_from_raw_partsNonNull::writeNonNull::write_bytesNonNull::write_unalignedOnceCell::into_innerOption::as_mutOption::expectOption::replaceOption::takeOption::unwrapOption::unwrap_uncheckedOption::<&_>::copiedOption::<&mut _>::copiedOption::<Option<_>>::flattenOption::<Result<_, _>>::transposeRefCell::into_innerResult::as_mutResult::<&_, _>::copiedResult::<&mut _, _>::copiedResult::<Option<_>, _>::transposeUnsafeCell::get_mutUnsafeCell::into_innerarray::from_mutchar::encode_utf8{float}::classify{float}::is_finite{float}::is_infinite{float}::is_nan{float}::is_normal{float}::is_sign_negative{float}::is_sign_positive{float}::is_subnormal{float}::from_bits{float}::from_be_bytes{float}::from_le_bytes{float}::from_ne_bytes{float}::to_bits{float}::to_be_bytes{float}::to_le_bytes{float}::to_ne_bytesmem::replaceptr::replaceptr::slice_from_raw_parts_mutptr::writeptr::write_unaligned<*const _>::copy_to<*const _>::copy_to_nonoverlapping<*mut _>::copy_from<*mut _>::copy_from_nonoverlapping<*mut _>::copy_to<*mut _>::copy_to_nonoverlapping<*mut _>::write<*mut _>::write_bytes<*mut _>::write_unalignedslice::from_mutslice::from_raw_parts_mut<[_]>::first_mut<[_]>::last_mut<[_]>::first_chunk_mut<[_]>::last_chunk_mut<[_]>::split_at_mut<[_]>::split_at_mut_checked<[_]>::split_at_mut_unchecked<[_]>::split_first_mut<[_]>::split_last_mut<[_]>::split_first_chunk_mut<[_]>::split_last_chunk_mutstr::as_bytes_mutstr::as_mut_ptrstr::from_utf8_unchecked_mutCargo
CARGO_MANIFEST_PATHenvironment variable, similar toCARGO_MANIFEST_DIRbut pointing directly to the manifest file.package.autolibto the manifest, allowing[lib]auto-discovery to be disabled.Rustdoc
# headersfrom the main item's doc comment. This is similar to a third-party feature provided by the rustdoc-search-enhancements browser extension.Compatibility Notes
Warn against function pointers using unsupported ABI strings.
Check well-formedness of the source type's signature in fn pointer casts. This partly closes a soundness hole that comes when casting a function item to function pointer
Use equality instead of subtyping when resolving type dependent paths.
Linking on macOS now correctly includes Rust's default deployment target. Due to a linker bug, you might have to pass
MACOSX_DEPLOYMENT_TARGETor fix your#[link]attributes to point to the correct frameworks. See #129369.Rust will now correctly raise an error for
repr(Rust)written on non-struct/enum/unionitems, since it previous did not have any effect.The future incompatibility lint
deprecated_cfg_attr_crate_type_namehas been made into a hard error. It was used to deny usage of#![crate_type]and#![crate_name]attributes in#![cfg_attr], which required a hack in the compiler to be able to change the used crate type and crate name after cfg expansion.Users can use
--crate-typeinstead of#![cfg_attr(..., crate_type = "...")]and--crate-nameinstead of#![cfg_attr(..., crate_name = "...")]when runningrustc/cargo rustcon the command line.Use of those two attributes outside of
#![cfg_attr]continue to be fully supported.Until now, paths into the sysroot were always prefixed with
/rustc/$hashin diagnostics, codegen, backtrace, e.g.RFC 3127 said
#129687 implements this behaviour, when
rust-srcis present at compile time,rustcreplaces/rustc/$hashwith a real path into the localrust-srccomponent with best effort.To sanitize this, users must explicitly supply
--remap-path-prefix=<path to rust-src>=fooor not have therust-srccomponent installed.The allow-by-default
missing_docslint used to disable itself when invoked throughrustc --test/cargo test, resulting in#[expect(missing_docs)]emitting false positives due to the expectation being wrongly unfulfilled. This behavior has now been removed, which allows#[expect(missing_docs)]to be fulfilled in all scenarios, but will also report newmissing_docsdiagnostics for publicly reachable#[cfg(test)]items, integration test crate-level documentation, and publicly reachable items in integration tests.The
armv8r-none-eabihftarget now uses the Armv8-R required set of floating-point features.Fix a soundness bug where rustc wouldn't detect unconstrained higher-ranked lifetimes in a
dyn Trait's associated types that occur due to supertraits.Update the minimum external LLVM version to 18.
Remove
aarch64-fuchsiaandx86_64-fuchsiatarget aliases in favor ofaarch64-unknown-fuchsiaandx86_64-unknown-fuchsiarespectively.The ABI-level exception class of a Rust panic is now encoded with native-endian bytes, so it is legible in hex dumps.
Visual Studio 2013 is no longer supported for MSVC targets.
The sysroot no longer contains the
stddynamic library in its top-levellib/dir.Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.