Empowering everyone to build reliable and efficient software.
#![cfg(FALSE)]
behaves on crate root
clippy::undropped_manually_drops
lint
clippy::invalid_utf8_in_unchecked
lint as invalid_from_utf8_unchecked
and invalid_from_utf8
clippy::cast_ref_to_mut
lint as invalid_reference_casting
clippy::cmp_nan
lint as invalid_nan_comparisons
dyn Trait
objects
cfg
-ed out items to mention them in diagnostics
-
is given as output file
loongarch64-unknown-none*
.eh_frame
from being emitted for -C panic=abort
Refer to Rust's platform support page for more information on Rust's tiered platform support.
thread::{park, unpark}
T: Sized
bounds on BufReader<T>
, BufWriter<T>
and LineWriter<T>
select_nth_unstable
Ok
on kill if process has already exited
Vec
s over different allocators
{Arc,Rc,Weak}::ptr_eq
ignore pointer metadata
[]
These APIs are now stable in const contexts:
-Zdoctest-in-workspace
by default. When running each documentation test, the working directory is set to the root directory of the package the test belongs to. docs #12221 #12288
build.jobs
parallelism back to the default. #12222
Display
for Ipv6Addr
for IPv4-compatible addresses
mips*-unknown-linux-gnu*
targets from host tier 2 to target tier 3 support.
raw-dylib
, link_ordinal
, import_name_type
and -Cdlltool
.
clippy::{drop,forget}_{ref,copy}
lints.
Drop
impl compatibility
PlaceMention
, making let _ =
patterns more consistent with respect to the borrow checker.--print deployment-target
flag for Apple targets.
extern "C-unwind"
and friends. The existing extern "C"
etc. may change behavior for cross-language unwinding in a future release.*-linux-musl
targets to 1.2.3, enabling time64 on 32-bit systems.debugger_visualizer
for embedding metadata like Microsoft's Natvis.Self
respect tuple constructor privacy.
apple-m1
as the target CPU for aarch64-apple-darwin
.
x86_64h-apple-darwin
target.
loongarch64-unknown-linux-gnu
to Tier 2 with host tools.
Refer to Rust's platform support page for more information on Rust's tiered platform support.
Drop
implementation, but panicking within a panic hook is now an immediate abort.From<&[T]> for Box<[T]>
bound to T: Clone
.
T: Send
bound in Error for mpsc::SendError<T>
and TrySendError<T>
.alloc::realloc
to match Layout
requirements that the size must not exceed isize::MAX
.const {}
syntax for std::thread_local
. This syntax was stabilized in Rust 1.59, but not previously mentioned in release notes.CStr::is_empty
BuildHasher::hash_one
NonZeroI*::is_positive
NonZeroI*::is_negative
NonZeroI*::checked_neg
NonZeroI*::overflowing_neg
NonZeroI*::saturating_neg
NonZeroI*::wrapping_neg
Neg for NonZeroI*
Neg for &NonZeroI*
From<[T; N]> for (T...)
(array to N-tuple for N in 1..=12)From<(T...)> for [T; N]
(N-tuple to array for N in 1..=12)windows::io::AsHandle for Box<T>
windows::io::AsHandle for Rc<T>
windows::io::AsHandle for Arc<T>
windows::io::AsSocket for Box<T>
windows::io::AsSocket for Rc<T>
windows::io::AsSocket for Arc<T>
These APIs are now stable in const contexts:
<*const T>::read
<*const T>::read_unaligned
<*mut T>::read
<*mut T>::read_unaligned
ptr::read
ptr::read_unaligned
<[T]>::split_at
Cargo.toml
.
workspace_default_members
to the output of cargo metadata
.
cargo new
/cargo init
.
rustdoc::unescaped_backticks
lint for broken inline code.
~~old~~
vs. ~new~
)TypeId
. Code that uses a constant TypeId
in a pattern will potentially be broken. Known cases have already been fixed -- in particular, users of the log
crate's kv_unstable
feature should update to log v0.4.18
or later.sysroot
crate to represent the standard library crates. This does not affect stable users, but may require adjustment in tools that build their own standard library.rustup
. When Cargo detects it will run rustc
pointing to a rustup proxy, it'll try bypassing the proxy and use the underlying binary directly. There are assumptions around the interaction with rustup and RUSTUP_TOOLCHAIN
. However, it's not expected to affect normal users.RUSTUP_HOME
and RUSTUP_TOOLCHAIN
in the [env]
configuration table. This is considered to be not a use case Cargo would like to support, since it will likely cause problems or lead to confusion.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.
asm!
operands
format_args
invocations to uses captures
let _ = expr
position.
-Cdebuginfo=line-tables-only
), which may eventually become the default for -Cdebuginfo=1
.unused_allocation
lint against Box::new
too
loongarch64-unknown-linux-gnu
i586-pc-nto-qnx700
(QNX Neutrino RTOS, version 7.0),Refer to Rust's platform support page for more information on Rust's tiered platform support.
Command
prefer non-verbatim paths
concat!
Cell
partial_cmp
to implement tuple lt
/le
/ge
/gt
atomic_as_ptr
nonnull_slice_from_raw_parts
once_cell
nonzero_min_max
FnPtr
trait that is implemented for all function pointers This extends Debug
, Pointer
, Hash
, PartialEq
, Eq
, PartialOrd
, and Ord
implementations for function pointers with all ABIs.NonZero*::MIN/MAX
BinaryHeap::retain
Default for std::collections::binary_heap::IntoIter
Default for std::collections::btree_map::{IntoIter, Iter, IterMut}
Default for std::collections::btree_map::{IntoKeys, Keys}
Default for std::collections::btree_map::{IntoValues, Values}
Default for std::collections::btree_map::Range
Default for std::collections::btree_set::{IntoIter, Iter}
Default for std::collections::btree_set::Range
Default for std::collections::linked_list::{IntoIter, Iter, IterMut}
Default for std::vec::IntoIter
Default for std::iter::Chain
Default for std::iter::Cloned
Default for std::iter::Copied
Default for std::iter::Enumerate
Default for std::iter::Flatten
Default for std::iter::Fuse
Default for std::iter::Rev
Default for std::slice::Iter
Default for std::slice::IterMut
Rc::into_inner
Arc::into_inner
std::cell::OnceCell
Option::is_some_and
NonNull::slice_from_raw_parts
Result::is_ok_and
Result::is_err_and
std::sync::atomic::Atomic*::as_ptr
std::io::IsTerminal
std::os::linux::net::SocketAddrExt
std::os::unix::net::UnixDatagram::bind_addr
std::os::unix::net::UnixDatagram::connect_addr
std::os::unix::net::UnixDatagram::send_to_addr
std::os::unix::net::UnixListener::bind_addr
std::path::Path::as_mut_os_str
std::sync::OnceLock
CARGO_PKG_README
sparse
the default protocol for crates.io
cargo logout
libtest
from supporting -Zunstable-options
let _ = expr
position.
sign-ext
and mutable-globals
features in codegen This may cause incompatibility with older execution environments.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.
Copy
fields.
cmpxchg16b
target feature on x86 and x86_64.
Self: Autotrait
bounds on dyn-safe trait methods.
str
as containing [u8]
for auto trait purposes.
*-pc-windows-gnu
on CI to mingw-w64 v10 and GCC 12.2.
true
and false
as boolean flags in compiler arguments.
repr(C)
enums to c_int
size.
DispatchFromDyn
for cell types, allowing downstream experimentation with custom method receivers.
fmt::Arguments::as_str()
may return Some(_)
in more cases after optimization, subject to change.
AsFd
and AsRawFd
for Rc
.
These APIs are now stable in const contexts:
SocketAddr::new
SocketAddr::ip
SocketAddr::port
SocketAddr::is_ipv4
SocketAddr::is_ipv6
SocketAddrV4::new
SocketAddrV4::ip
SocketAddrV4::port
SocketAddrV6::new
SocketAddrV6::ip
SocketAddrV6::port
SocketAddrV6::flowinfo
SocketAddrV6::scope_id
cargo fix
or cargo clippy --fix
when compilation warnings are auto-fixable.
cargo add
if you try to install a library crate.
CARGO_BIN_NAME
environment variable also for binary examples.
rustdoc::all
group.
!
.
rust-analysis
component from rustup
now only contains a warning placeholder. This was primarily intended for RLS, and the corresponding -Zsave-analysis
flag has been removed from the compiler as well.default-features
is set to false of a workspace dependency, and an inherited dependency of a member has default-features = true
, Cargo will enable default features of that dependency.
CARGO_HOME
in the [env]
configuration table. Cargo itself doesn't pick up this value, but recursive calls to cargo would, which was not intended.
tools = [...]
is set in config.toml, we will respect a missing rustdoc in that list. By default rustdoc remains included. To retain the prior behavior explicitly add "rustdoc"
to the list.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.
@revoked
and a better error message for @cert-authority
in Cargo's SSH host key verification
$prefix-clang
as clang
in linker detection code
alloc
on stable without requiring the definition of a handler for allocation failure. Defining custom handlers is still unstable.efiapi
calling convention.
bindings_with_variant_name
to deny-by-default
armv7-sony-vita-newlibeabihf
as a tier 3 target
std::task::Context
!Send and !Sync
OnceWith
& RepeatWith
Vec -> VecDeque
conversion guarantee
{core,std}::pin::pin!
impl From<bool> for {f32,f64}
std::path::MAIN_SEPARATOR_STR
impl DerefMut for PathBuf
These APIs are now stable in const contexts:
cargo build --verbose
tells you more about why it recompiles.
net.git-fetch-with-cli
option enabled
SEMICOLON_IN_EXPRESSIONS_FROM_MACROS
to future-incompat report
--target
by default for -Zgcc-ld=lld
on wasm
IMPLIED_BOUNDS_ENTAILMENT
to Deny + ReportNow
std::task::Context
no longer implements Send and Sync
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-pc-windows-msvc
x86_64-apple-darwin
Sized
predicates coinductive, allowing cycles.
#[must_use]
annotations on async fn
also affect the Future::Output
.
cfg(FALSE)
.
C
or cdecl
.
verbatim
.
Added, updated, and removed targets:
powerpc64-ibm-aix
.mipsel-sony-psx
.no_std
targets for the QNX Neutrino RTOS, aarch64-unknown-nto-qnx710
and x86_64-pc-nto-qnx710
.aarch64-unknown-uefi
, i686-unknown-uefi
, and x86_64-unknown-uefi
.linuxkernel
targets (not used by the actual kernel).Refer to Rust's platform support page for more information on Rust's tiered platform support.
crossbeam-channel
into std::sync::mpsc
.
Eq
and Hash
for ControlFlow
.
compiler_builtins
with -C panic=abort
.
{integer}::checked_ilog
{integer}::checked_ilog2
{integer}::checked_ilog10
{integer}::ilog
{integer}::ilog2
{integer}::ilog10
NonZeroU*::ilog2
NonZeroU*::ilog10
NonZero*::BITS
These APIs are now stable in const contexts:
repr(Rust)
types now groups m*2^n-sized fields with equivalently aligned ones. This is intended to be an optimization, but it is also known to increase type sizes in a few cases for the placement of enum tags. As a reminder, the layout of repr(Rust)
types is an implementation detail, subject to change.&&
and ||
will now drop temporaries from their sub-expressions in evaluation order, left-to-right. Previously, it was "twisted" such that the first expression dropped its temporaries last, after all of the other expressions dropped in order.-export-dynamic
to wasm-ld
.
main
is now mangled as __main_void
on wasm32-wasi
.
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.