chore(deps): update rust to 1.99 - autoclosed
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| rust (source, changelog) | toolchain | minor | 1.97 → 1.99 |
| rust (source, changelog) | uses-with | minor | 1.97 → 1.99 |
Release Notes
rust-lang/rust (rust)
v1.99.0
==========================
Language
- Add allow-by-default
raw_borrows_via_referenceslint that checks for references that decay immediately into raw borrows - Extend
unconditional_paniclint to function calls that panic when the chunks/windows size is zero - Stabilize C-variadic function definitions
- Stabilize the ability to use
#[unsafe(naked)]functions to define C-variadic functions (#![feature(c_variadic_naked_functions)]). - Trait methods are now resolved on an adjusted never type (producing a FCW)
- Coerce from inference variables to trait objects if the inference variable is related via subtyping to a type that is known to be
Sized - Stabilize
#[my_macro] mod foo;. This allows outlined modules (mod foo;) anywhere in the body of a custom attribute or derive macro. - Fix the
overflowing_literalslint with repeated negation. For instance, it will now no longer lint on--128_i8, which is already detected by thearithmetic_overflowlint. - Add POSIX symbols to the
invalid_runtime_symbol_definitionsandsuspicious_runtime_symbol_definitionslints - Lint unused
#[path]attributes on inline modules - Enable
unreachable_cfg_select_predicateslint as part ofunusedlint group - Stabilize passing 128-bit integers via vector registers with
asm!on x86 - Explicitly document that some allocations are allowed to grow in-place (but none are allowed to shrink)
- We now guarantee that the contents of an
UnsafeCellcan be accessed without going throughget - Account for globally enabled target features in
global_asm! - Warn if an invalid
docattribute is used on a macro invocation
Compiler
- Convert
-Ctarget-cpuinto a target-modifier for AVR, AMDGCN and NVPTX - Enable
static_position_independent_executableson all gnu targets - When providing a suggestion about a missing method, rustc now prefers an exactly matching name from a doc alias attribute over a similarity search from other method names. If your new users sometimes expect a method under a different name, adding a doc alias will now help them find it via rustc suggestions, in addition to helping them find it via rustdoc search: When suggesting method names, prefer exact doc aliases over similar names
Platform Support
Refer to Rust's platform support page
for more information on Rust's tiered platform support.
Libraries
- Iteration on
RangeInclusive(a..=branges) is now optimized better in some circumstances. As a side effect of this, the behavior ofRangeInclusivevalues that has already been exhausted (as an iterator) has changed. For example, the return values ofstart()andend()on such ranges may return different values, and using such ranges as slice indexes may have different behavior. These behaviors were not guaranteed to be stable, so these changes are considered to not be breaking changes. - Relax
transmute_copyto accept?Sizedtypes - Update
transmute_copyto use a non-unwinding panic - Don't escape U+FF9E and U+FF9F in
escape_debug_ext - Re-export
core::fmt::NumBufferinalloc(andstd)
Stabilized APIs
IntoIteratorforBox<[T; N]>IntoIteratorfor&Box<[T; N]>IntoIteratorfor&mut Box<[T; N]>VecDeque::retain_backcore::ffi::VaListBox::into_non_nullBox::from_non_nullVec::into_partsVec::from_partscore::mem::size_of_val_rawcore::mem::align_of_val_rawcore::alloc::Layout::for_value_rawString::from_utf8_lossy_ownedstring::FromUtf8Error::into_utf8_lossyFusedIterator for StepBy<I>std::fs::set_timesstd::fs::set_times_nofollow
Cargo
- Add a new built-in profile
debug. This is a preparation for transitioning thedevprofile away from debugging to give a saner default for faster development iterations. Currently there is no difference betweendevanddebugprofiles. docs #17214 - Workspace members on edition 2024 or later can now override an inherited workspace dependency's
default-featuresfield. For example,serde = { workspace = true, default-features = false }now turns off default features even when the workspace definition enables them. On earlier editions,default-features = falseis ignored with a warning. (RFC 3945) #17126
See also the full Cargo changelog
Rustdoc
- Add new
unused_footnote_definitionrustdoc lint - Smarter filtering of trait impls yields performance improvements of 20% on average and up to 40% on some real-world crates. (1, 2, 3, 4, 5)
Compatibility Notes
- Fully deprecate the legacy integral modules. For example,
std::i32::MAXshould be accessed viai32::MAXinstead. - Upgrade
no_mangle_generic_itemsinto hard error - The
Pin::new_uncheckedhas had its safety invariants changed slightly - Do not promote references to extern statics
- Ensure that the inferred types of
letpatterns typecheck - hermit/fs: Return
unsupported()instead offrom_raw_os_error(22) - Fixed a bug where
#[repr(simd)]was accidentally allowed on macro invocations on stable Rust - Abort const-eval when there are generics in the type of the value being produced
- Attributes not applying to anything are now an error in code blocks in doc comments
Box::leak: tell people to avoid unleaking- PowerPC inline ASM: Fix scalar floats being in the wrong vector lane on little endian
- Do not take
doc(cfg())into account when filtering doctests - Infer anonymous lifetimes in the types of associated consts as
'static - Macros that expand to a semicolon now produce a warning lint (
semicolon_in_expressions_from_non_local_macros) even when the macro comes from another crate. Previously, such warnings only appeared for macros from the same crate, to avoid showing warnings that can't be fixed locally; however, this masked problems, as integration tests from the crate providing the macro get compiled as a separate crate, so tests often wouldn't reveal this issue. If you encounter a lint like this, please make sure to report it to the crate providing the macro so they can fix it; don't just silence it in your own crate. - In Cargo, incremental compilation is now disabled by default when running in CI. CI is detected via the
CIenvironment variable. #17220 - The Rust Reference no longer recommends using a single pattern to match a union alongside another value, such as in a manually-written tagged union. This was because it was found that such code would, in some circumstances, result in the compiler reading the contents of the union before checking if the rest of the scrutinee matches the rest of the pattern. This can cause undefined behavior in code similar to what the reference previously recommended.
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.98.1
===========================
v1.98.0
==========================
Language
- Allow shortening lifetime of
&mutwhen unsize-coercing, even in an invariant position. For example, you can now coerce aCell<&'long mut i32>to aCell<&'short mut dyn Send>. Such shortenings were already previously allowed when coercing a&mutto a&, or coercing a&to a&. - Add deny-by-default
invalid_runtime_symbol_definitionslint and warn-by-defaultsuspicious_runtime_symbol_definitionslint- The lints currently specifically targets
coreruntime symbols likememcmp,memset,strlen, ... and is planned to be expanded in the next few releases.
- The lints currently specifically targets
- Add warn-by-default
c_void_returnslint to checkcore::ffi::c_voidas a return type
Platform Support
- Add
powerpc64-unknown-linux-gnuelfv2as Tier 3 - Add
aarch64-unknown-linux-pauthtestas Tier 3 target - Promote
thumbv7a-none-eabito Tier 2 - Promote
thumbv7a-none-eabihfto Tier 2 - Promote
thumbv7r-none-eabito Tier 2 - Promote
thumbv7r-none-eabihfto Tier 2 - Promote
thumbv8r-none-eabihfto Tier 2
Refer to Rust's platform support page
for more information on Rust's tiered platform support.
Libraries
- Change
Location<'_>lifetime to'staticinPanic[Hook]Info - Document panic in
RangeInclusive::from(legacy::RangeInclusive) - Document that
ManuallyDrop'sBoxinteraction has been fixed - Stabilize LoongArch CRC Intrinsics
- The
derivemacro is available at{core,std}::derive. This was previously unintentionally stabilized in 1.96, but is now explicitly accepted as a stabilized API.- Please note that the MSRV for
{core,std}::derivewill be 1.96, and not 1.98.
- Please note that the MSRV for
Stabilized APIs
str::substr_range[T]::subslice_rangecore::fmt::NumBuffer<{integer}>::format_intoSend/Sync for std::process::CommandArgs{fN}::algebraic_add{fN}::algebraic_sub{fN}::algebraic_mul{fN}::algebraic_div{fN}::algebraic_remNonZero<{integer}>::from_str_radixString::from_utf16leString::from_utf16le_lossyString::from_utf16beString::from_utf16be_lossy[T]::strip_circumfixstr::strip_circumfixAtomic<T>::from_mutAtomic<T>::get_mut_sliceAtomic<T>::from_mut_slicestd::range::legacybool::ok_orbool::ok_or_else
Compatibility Notes
- If fully elided, lifetime bounds of trait object types may now resolve differently or even get rejected in very specific niche scenarios
- Error in more cases of ambiguous imports
- Switch the destructors implementation for thread locals on Windows to use Fiber Local Storage (FLS)
- Convert some cases of the
ambiguous_glob_importslint into a hard error - Where-bounds of the form
Type = TypeandType == Typeare no longer syntactically allowed - Ensure Send/Sync is not implemented for std::env::Vars{,Os}
- Fix that in some attributes, arguments were not properly rejected
repr(transparent)is now more strict about which fields have "trivial" layout and hence can be ignored:repr(C)types, types with private fields, and#[non_exhaustive]types are no longer considered "trivial"- Correctly check whether types have equal size in
transmute()when somereprattributes are involved. - More characters are escaped when printing strings and chars
- Implement fast path for
derive(PartialOrd)when derivingOrd
This can break crates in practice where a type's PartialOrd and Ord impls were inconsistent with each other. - Add temporary scope to
assert_eqandassert_ne - Closed a hole in the pattern matching structural equality check, preventing cases where a match of a constant would be allowed, despite disagreeing with a manually written
PartialEqimplementation, when aderive(PartialEq)implementation for that type also exists. - On Emscripten the WASM exception handling ABI is now unconditionally used The
-Zemscripten-wasm-eh=falseflag to switch back to JS exceptions has been removed. - The UNSAFE_CODE lint is now consistently emitted for all unsafe attributes
- Solaris: remove
File::lockimplementation, it has the wrong semantics (return "unsupported" instead) - Windows-gnu targets now specify baseline tools versions
- rustfmt now discovers module files that are defined in
cfg_select!
This may cause more code to be formatted which was previously ignored.
Configuration
📅 Schedule: (UTC)
- 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 is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
- If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.