Closed
Description
NOTE: We are trying this issue as a new way to work on the draft release notes.
Use the π links to edit those that have a relnotes-tracking-issue
,
and they will be updated when we regenerate the notes periodically.
cc @rust-lang/release
Version 1.87.0 (2025-05-15)
Language
- Stabilize
asm_goto
feature
π - Allow parsing open beginning ranges after unary operators
π - Don't require method impls for methods with
Self: Sized
bounds inimpl
s for unsized types
π - Stabilize
feature(precise_capturing_in_traits)
allowinguse<...>
bounds on return positionimpl Trait
intrait
s
π
Compiler
Platform Support
Refer to Rust's platform support page
for more information on Rust's tiered platform support.
Libraries
- Stabilize the anonymous pipe API
π - Add support for unbounded left/right shift operations
π - Print pointer metadata in
Debug
impl of raw pointers
π Vec::with_capacity
guarantees it allocates with the amount requested, even ifVec::capacity
returns a different number.
π- Most
std::arch
intrinsics which don't take pointer arguments can now be called from safe code if the caller has the appropriate target features already enabled (mark x86 intrinsics as safeΒ stdarch#1714, mark arm intrinsics as safeΒ stdarch#1716, mark riscv intrinsics as safeΒ stdarch#1717)
π - Undeprecate
env::home_dir
π - Denote
ControlFlow
as#[must_use]
π - Macros such as
assert_eq!
andvec!
now supportconst {...}
expressions
π
Stabilized APIs
Vec::extract_if
vec::ExtractIf
LinkedList::extract_if
linked_list::ExtractIf
π<[T]>::split_off
<[T]>::split_off_mut
<[T]>::split_off_first
<[T]>::split_off_first_mut
<[T]>::split_off_last
<[T]>::split_off_last_mut
πString::extend_from_within
πos_str::Display
OsString::display
OsStr::display
πio::pipe
io::PipeReader
io::PipeWriter
impl From<PipeReader> for OwnedHandle
impl From<PipeWriter> for OwnedHandle
impl From<PipeReader> for Stdio
impl From<PipeWriter> for Stdio
impl From<PipeReader> for OwnedFd
impl From<PipeWriter> for OwnedFd
πBox<MaybeUninit<T>>::write
πimpl TryFrom<Vec<u8>> for String
π
These APIs are now stable in const contexts:
<*const T>::offset_from_unsigned
<*const T>::byte_offset_from_unsigned
<*mut T>::offset_from_unsigned
<*mut T>::byte_offset_from_unsigned
NonNull::offset_from_unsigned
NonNull::byte_offset_from_unsigned
π<uN>::cast_signed
NonZero::<uN>::cast_signed
.<iN>::cast_signed
.NonZero::<iN>::cast_unsigned
.
π<uN>::is_multiple_of
π<uN>::unbounded_shl
<uN>::unbounded_shr
<iN>::unbounded_shl
<iN>::unbounded_shr
π<str>::from_utf8
<str>::from_utf8_mut
<str>::from_utf8_unchecked
<str>::from_utf8_unchecked_mut
π<[T]>::copy_from_slice
πSocketAddr::set_ip
SocketAddr::set_port
,SocketAddrV4::set_ip
SocketAddrV4::set_port
,SocketAddrV6::set_ip
SocketAddrV6::set_port
SocketAddrV6::set_flowinfo
SocketAddrV6::set_scope_id
πchar::is_digit
char::is_whitespace
π<iN>:midpoint
π<[[T; N]]>::as_flattened
<[[T; N]]>::as_flattened_mut
π<str>::from_utf8_mut
core::str::from_utf8_mut
πString::into_bytes
String::as_str
String::capacity
String::as_bytes
String::len
String::is_empty
String::as_mut_str
String::as_mut_vec
Vec::as_ptr
Vec::as_slice
Vec::capacity
Vec::len
Vec::is_empty
Vec::as_mut_slice
Vec::as_mut_ptr
π
Cargo
- Add terminal integration via ANSI OSC 9;4 sequences
- chore: bump openssl to v3
- feat(package): add --exclude-lockfile flag
Rustdoc
Compatibility Notes
- Rust now raises an error for macro invocations inside the
#![crate_name]
attribute
π - Unstable fields are now always considered to be inhabited
π - Macros ??? may ?? break now ??? due to ranges and unary operators ??? idk ?
π - Make
Debug
impl of raw pointers print metadata if present
π - Warn against function pointers using unsupported ABI strings in dependencies
π - Associated types on
dyn
types are no longer deduplicated
π - Forbid attributes on
..
inside of struct patterns (let Struct { #[attribute] .. }) =
π - Make
ptr_cast_add_auto_to_object
lint into hard error
π - Many
std::arch
intrinsics are now safe to call in some contexts, there may now be newunused_unsafe
warnings in existing codebases.
π - Limit
width
andprecision
formatting options to 16 bits on all targets
π - Turn order dependent trait objects future incompat warning into a hard error
π - Denote
ControlFlow
as#[must_use]
π - Remove i586-pc-windows-msvc target
π - Windows: The standard library no longer links advapi32, except on win7. Code such as C libraries that were relying on this assumption may need to explicitly link advapi32.
π - Remove
Nonterminal
andTokenKind::Interpolated
π - expand: Leave traces when expanding
cfg
attributes
π
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.