-
Latest Version
Rust 1.83.0 LATEST
-
Review by
-
Operating System
Windows 7 / Windows 8 / Windows 10 / Windows 11
-
User Rating
Click to vote -
Author / Product
-
Filename
rustup-init.exe
Rust’s rich type system and ownership model guarantee memory-safety and thread-safety — and enable you to eliminate many classes of bugs at compile-time.
It has great documentation, a friendly compiler with useful error messages, and top-notch tooling — an integrated package manager and build tool, smart multi-editor support with auto-completion and type inspections, an auto-formatter, and more.
In 2018, the community decided to improve the programming experience for a few distinct domains (see the 2018 roadmap). For these, you can find many high-quality crates and some awesome guides on how to get started.
Command Line
Whip up a CLI tool quickly with Rust’s robust ecosystem. It helps you maintain your app with confidence and distribute it with ease.
WebAssembly
Use Rust to supercharge your JavaScript, one module at a time. Publish to npm, bundled with webpack, and you’re off to the races.
Networking
Predictable performance. Tiny resource footprint. Rock-solid reliability. Rust is great for network services.
Embedded
Targeting low-resource devices? Need low-level control without giving up high-level conveniences? It has you covered.
Hundreds of companies around the world are using Rust for Windows in production today for fast, low-resource, cross-platform solutions. The software you know and love, like Firefox, Dropbox, and Cloudflare, uses the app. From startups to large corporations, from embedded devices to scalable web services, Rust is a great fit.
Also Available: Download Rust for Mac
What's new in this version:
Rust 1.83.0
Language:
- Stabilize &mut, *mut, &Cell, and *const Cell in const
- Allow creating references to statics in const initializers
- Implement raw lifetimes and labels ('r#ident)
- Define behavior when atomic and non-atomic reads race
- Non-exhaustive structs may now be empty
- Disallow implicit coercions from places of type
- const extern functions can now be defined for other calling conventions
- Stabilize expr_2021 macro fragment specifier in all editions
- The non_local_definitions lint now fires on less code and warns by default
Compiler:
- Deprecate unsound -Csoft-float flag
Add many new tier 3 targets:
- aarch64_unknown_nto_qnx700
- arm64e-apple-tvos
- armv7-rtems-eabihf
- loongarch64-unknown-linux-ohos
- riscv32-wrs-vxworks and riscv64-wrs-vxworks
- riscv32{e|em|emc}-unknown-none-elf
- x86_64-unknown-hurd-gnu
- x86_64-unknown-trusty
- Refer to Rust's platform support page for more information on Rust's tiered platform support.
Libraries:
- Implement PartialEq for ExitCode.
- Document that catch_unwind can deal with foreign exceptions without UB, although the exact behavior is unspecified.
- Implement Default for HashMap/HashSet iterators that don't already have it.
- Bump Unicode to version 16.0.0.
- Change documentation of ptr::add/sub to not claim equivalence with offset..
Stabilized APIs:
- BufRead::skip_until
- ControlFlow::break_value
- ControlFlow::continue_value
- ControlFlow::map_break
- ControlFlow::map_continue
- DebugList::finish_non_exhaustive
- DebugMap::finish_non_exhaustive
- DebugSet::finish_non_exhaustive
- DebugTuple::finish_non_exhaustive
- ErrorKind::ArgumentListTooLong
- ErrorKind::Deadlock
- ErrorKind::DirectoryNotEmpty
- ErrorKind::ExecutableFileBusy
- ErrorKind::FileTooLarge
- ErrorKind::HostUnreachable
- ErrorKind::IsADirectory
- ErrorKind::NetworkDown
- ErrorKind::NetworkUnreachable
- ErrorKind::NotADirectory
- ErrorKind::NotSeekable
- ErrorKind::ReadOnlyFilesystem
- ErrorKind::ResourceBusy
- ErrorKind::StaleNetworkFileHandle
- ErrorKind::StorageFull
- ErrorKind::TooManyLinks
- Option::get_or_insert_default
- Waker::data
- Waker::new
- Waker::vtable
- char::MIN
- hash_map::Entry::insert_entry
- hash_map::VacantEntry::insert_entry
- These APIs are now stable in const contexts:
- Cell::into_inner
- Duration::as_secs_f32
- Duration::as_secs_f64
- Duration::div_duration_f32
- Duration::div_duration_f64
- MaybeUninit::as_mut_ptr
- NonNull::as_mut
- NonNull::copy_from
- NonNull::copy_from_nonoverlapping
- NonNull::copy_to
- NonNull::copy_to_nonoverlapping
- NonNull::slice_from_raw_parts
- NonNull::write
- NonNull::write_bytes
- NonNull::write_unaligned
- OnceCell::into_inner
- Option::as_mut
- Option::expect
- Option::replace
- Option::take
- Option::unwrap
- Option::unwrap_unchecked
- Option::<&_>::copied
- Option::<&mut _>::copied
- Option::<Option<_>>::flatten
- Option::<Result<_, _>>::transpose
- RefCell::into_inner
- Result::as_mut
- Result::<&_, _>::copied
- Result::<&mut _, _>::copied
- Result::<Option<_>, _>::transpose
- UnsafeCell::get_mut
- UnsafeCell::into_inner
- array::from_mut
- char::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_bytes
- mem::replace
- ptr::replace
- ptr::slice_from_raw_parts_mut
- ptr::write
- ptr::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_unaligned
- slice::from_mut
- slice::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_mut
- str::as_bytes_mut
- str::as_mut_ptr
- str::from_utf8_unchecked_mut
Cargo:
- Introduced a new CARGO_MANIFEST_PATH environment variable, similar to CARGO_MANIFEST_DIR but pointing directly to the manifest file.
- Added package.autolib to the manifest, allowing [lib] auto-discovery to be disabled.
- Declare support level for each crate in Cargo's Charter / crate docs.
- Declare new Intentional Artifacts as 'small' changes.
Rust 1.82.0
Language:
- Don't make statement nonterminals match pattern nonterminals
- Patterns matching empty types can now be omitted in common cases
- Enforce supertrait outlives obligations when using trait impls
- addr_of(_mut)! macros and the newly stabilized &raw (const|mut) are now safe to use with all static items
- size_of_val_raw: for length 0 this is safe to call
- Reorder trait bound modifiers after for<...> binder in trait bounds
- Stabilize opaque type precise capturing (RFC 3617)
- Stabilize &raw const and &raw mut operators (RFC 2582)
- Stabilize unsafe extern blocks (RFC 3484)
- Stabilize nested field access in offset_of!
- Do not require T to be live when dropping [T; 0]
- Stabilize const operands in inline assembly
- Stabilize floating-point arithmetic in const fn
- Stabilize explicit opt-in to unsafe attributes
- Document NaN bit patterns guarantees
Compiler:
- Promote riscv64gc-unknown-linux-musl to tier 2
- Promote Mac Catalyst targets aarch64-apple-ios-macabi and x86_64-apple-ios-macabi to Tier 2, and ship them with rustup
- Add tier 3 NuttX based targets for RISC-V and ARM
- Add tier 3 powerpc-unknown-linux-muslspe target
- Improved diagnostics to explain why a pattern is unreachable
- The compiler now triggers the unreachable code warning properly for async functions that don't return/are -> !
- Promote aarch64-apple-darwin to Tier 1
- Add Trusty OS target aarch64-unknown-trusty and armv7-unknown-trusty as tier 3 targets
- Promote wasm32-wasip2 to Tier 2
Libraries:
- Generalize {Rc,Arc}::make_mut() to Path, OsStr, and CStr
Stabilized APIs:
- std::thread::Builder::spawn_unchecked
- std::str::CharIndices::offset
- std::option::Option::is_none_or
- [T]::is_sorted
- [T]::is_sorted_by
- [T]::is_sorted_by_key
- Iterator::is_sorted
- Iterator::is_sorted_by
- Iterator::is_sorted_by_key
- std::future::Ready::into_inner
- std::iter::repeat_n
- impl DoubleEndedIterator for Take<Repeat>
- impl ExactSizeIterator for Take<Repeat>
- impl ExactSizeIterator for Take<RepeatWith>
- impl Default for std::collections::binary_heap::Iter
- impl Default for std::collections::btree_map::RangeMut
- impl Default for std::collections::btree_map::ValuesMut
- impl Default for std::collections::vec_deque::Iter
- impl Default for std::collections::vec_deque::IterMut
- Rc::new_uninit
- Rc::assume_init
- Rc<[T]>::new_uninit_slice
- Rc<[MaybeUninit]>::assume_init
- Arc::new_uninit
- Arc::assume_init
- Arc<[T]>::new_uninit_slice
- Arc<[MaybeUninit]>::assume_init
- Box::new_uninit
- Box::assume_init
- Box<[T]>::new_uninit_slice
- Box<[MaybeUninit]>::assume_init
- core::arch::x86_64::_bextri_u64
- core::arch::x86_64::_bextri_u32
- core::arch::x86::_mm_broadcastsi128_si256
- core::arch::x86::_mm256_stream_load_si256
- core::arch::x86::_tzcnt_u16
- core::arch::x86::_mm_extracti_si64
- core::arch::x86::_mm_inserti_si64
- core::arch::x86::_mm_storeu_si16
- core::arch::x86::_mm_storeu_si32
- core::arch::x86::_mm_storeu_si64
- core::arch::x86::_mm_loadu_si16
- core::arch::x86::_mm_loadu_si32
- core::arch::wasm32::u8x16_relaxed_swizzle
- core::arch::wasm32::i8x16_relaxed_swizzle
- core::arch::wasm32::i32x4_relaxed_trunc_f32x4
- core::arch::wasm32::u32x4_relaxed_trunc_f32x4
- core::arch::wasm32::i32x4_relaxed_trunc_f64x2_zero
- core::arch::wasm32::u32x4_relaxed_trunc_f64x2_zero
- core::arch::wasm32::f32x4_relaxed_madd
- core::arch::wasm32::f32x4_relaxed_nmadd
- core::arch::wasm32::f64x2_relaxed_madd
- core::arch::wasm32::f64x2_relaxed_nmadd
- core::arch::wasm32::i8x16_relaxed_laneselect
- core::arch::wasm32::u8x16_relaxed_laneselect
- core::arch::wasm32::i16x8_relaxed_laneselect
- core::arch::wasm32::u16x8_relaxed_laneselect
- core::arch::wasm32::i32x4_relaxed_laneselect
- core::arch::wasm32::u32x4_relaxed_laneselect
- core::arch::wasm32::i64x2_relaxed_laneselect
- core::arch::wasm32::u64x2_relaxed_laneselect
- core::arch::wasm32::f32x4_relaxed_min
- core::arch::wasm32::f32x4_relaxed_max
- core::arch::wasm32::f64x2_relaxed_min
- core::arch::wasm32::f64x2_relaxed_max
- core::arch::wasm32::i16x8_relaxed_q15mulr
- core::arch::wasm32::u16x8_relaxed_q15mulr
- core::arch::wasm32::i16x8_relaxed_dot_i8x16_i7x16
- core::arch::wasm32::u16x8_relaxed_dot_i8x16_i7x16
- core::arch::wasm32::i32x4_relaxed_dot_i8x16_i7x16_add
- core::arch::wasm32::u32x4_relaxed_dot_i8x16_i7x16_add
These APIs are now stable in const contexts:
- std::task::Waker::from_raw
- std::task::Context::from_waker
- std::task::Context::waker
- $integer::from_str_radix
- std::num::ParseIntError::kind
Cargo:
- feat: Add info cargo subcommand
Rust 1.80.1
Fixed:
- Miscompilation when comparing floats
- False positives in the dead_code lint
Rust 1.80.0
Language:
- Document maximum allocation size
- Allow zero-byte offsets and ZST read/writes on arbitrary pointers
- Support C23's variadics without a named parameter
- Stabilize exclusive_range_pattern feature
- Guarantee layout and ABI of Result in some scenarios
Compiler:
- Update cc crate to v1.0.97 allowing additional spectre mitigations on MSVC targets
- Allow field reordering on types marked repr(packed(1))
- Add a lint against never type fallback affecting unsafe code
- Disallow cast with trailing braced macro in let-else
- Expand for_loops_over_fallibles lint to lint on fallibles behind references.
- self-contained linker: retry linking without -fuse-ld=lld on CCs that don't support it
- Do not parse CVarArgs (...) as a type in trait bounds
- Improvements to LLDB formatting #124458 #124500
- For the wasm32-wasip2 target default to PIC and do not use -fuse-ld=lld
- Add x86_64-unknown-linux-none as a tier 3 target
- Lint on foo.into_iter() resolving to &Box: IntoIterator
Libraries:
- Add size_of and size_of_val and align_of and align_of_val to the prelude
- Abort a process when FD ownership is violated
- io::Write::write_fmt: panic if the formatter fails when the stream does not fail
- Panic if PathBuf::set_extension would add a path separator
- Add assert_unsafe_precondition to unchecked_{add,sub,neg,mul,shl,shr} methods
- Update c_char on AIX to use the correct type
- offset_of! no longer returns a temporary
- Handle sigma in str.to_lowercase correctly
- Raise DEFAULT_MIN_STACK_SIZE to at least 64KiB
Stabilized APIs:
- impl Default for Rc
- impl Default for Rc
- impl Default for Rc
- impl Default for Arc
- impl Default for Arc
- impl Default for Arc
- impl IntoIterator for Box
- impl FromIterator for Box
- impl FromIterator for Box
- LazyCell
- LazyLock
- Duration::div_duration_f32
- Duration::div_duration_f64
- Option::take_if
- Seek::seek_relative
- BinaryHeap::as_slice
- NonNull::offset
- NonNull::byte_offset
- NonNull::add
- NonNull::byte_add
- NonNull::sub
- NonNull::byte_sub
- NonNull::offset_from
- NonNull::byte_offset_from
- NonNull::read
- NonNull::read_volatile
- NonNull::read_unaligned
- NonNull::write
- NonNull::write_volatile
- NonNull::write_unaligned
- NonNull::write_bytes
- NonNull::copy_to
- NonNull::copy_to_nonoverlapping
- NonNull::copy_from
- NonNull::copy_from_nonoverlapping
- NonNull::replace
- NonNull::swap
- NonNull::drop_in_place
- NonNull::align_offset
- ::split_at_checked
- ::split_at_mut_checked
- str::split_at_checked
- str::split_at_mut_checked
- str::trim_ascii
- str::trim_ascii_start
- str::trim_ascii_end
- ::trim_ascii
- ::trim_ascii_start
- ::trim_ascii_end
- Ipv4Addr::BITS
- Ipv4Addr::to_bits
- Ipv4Addr::from_bits
- Ipv6Addr::BITS
- Ipv6Addr::to_bits
- Ipv6Addr::from_bits
Vec:into_flattened
- ::as_flattened
- ::as_flattened_mut
- These APIs are now stable in const contexts:
- ::last_chunk
- BinaryHeap::new
- Cargo:::
- Stabilize -Zcheck-cfg as always enabled
- Warn, rather than fail publish, if a target is excluded
- Add special check-cfg lint config for the unexpected_cfgs lint
- Stabilize cargo update --precise
- Don't change file permissions on Cargo.toml when using cargo add
- Support using cargo fix on IPv6-only networks
Rustdoc:
- Allow searching for references
- Stabilize custom_code_classes_in_docs feature
- fix: In cross-crate scenarios show enum variants on type aliases of enums
Compatibility Notes:
- rustfmt estimates line lengths differently when using non-ascii characters
- Type aliases are now handled correctly in orphan check
- Allow instructing rustdoc to read from stdin via -
- std::env::{set_var, remove_var} can no longer be converted to safe function pointers and no longer implement the Fn family of traits
- Warn (or error) when Self constructor from outer item is referenced in inner nested item
- Turn indirect_structural_match and pointer_structural_match lints into hard errors
- Make where_clause_object_safety lint a regular object safety violation
- Turn proc_macro_back_compat lint into a hard error.
- Detect unused structs even when implementing private traits
- std::sync::ReentrantLockGuard is no longer Sync if T: !Sync which means std::io::StdoutLock and std::io::StderrLock are no longer Sync
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.
- Misc improvements to size of generated html by rustdoc e.g. #124738 and #123734
- MSVC targets no longer depend on libc
Rust 1.77.2
- Fixed: fix escaping of Windows batch file arguments in std::process::Command
Rust 1.77.1
- Cargo enabled stripping of debuginfo in release builds by default in Rust 1.77.0. However, due to a pre-existing issue, debuginfo stripping does not behave in the expected way on Windows with the MSVC toolchain.
- Rust 1.77.1 therefore disables the new Cargo behavior on Windows for targets that use MSVC. There are no changes for other targets. We plan to eventually re-enable debuginfo stripping in release mode in a later Rust release.
Rust 1.77.0
Language:
- Reveal opaque types within the defining body for exhaustiveness checking
- Stabilize C-string literals
- Stabilize THIR unsafeck
- Add lint static_mut_refs to warn on references to mutable statics
- Support async recursive calls (as long as they have indirection)
- Undeprecate lint unstable_features and make use of it in the compiler
- Make inductive cycles in coherence ambiguous always
- Get rid of type-driven traversal in const-eval interning, only as a future compatiblity lint for now
- Deny braced macro invocations in let-else
Compiler:
- Include lint soft_unstable in future breakage reports
- Make i128 and u128 16-byte aligned on x86-based targets
- Use --verbose in diagnostic output
- Improve spacing between printed tokens
- Merge the unused_tuple_struct_fields lint into dead_code
- Error on incorrect implied bounds in well-formedness check, with a temporary exception for Bevy
- Fix coverage instrumentation/reports for non-ASCII source code
- Fix fn/const items implied bounds and well-formedness check
- Promote riscv32{im|imafc}-unknown-none-elf targets to tier 2
Add several new tier 3 targets:
- aarch64-unknown-illumos
- hexagon-unknown-none-elf
- riscv32imafc-esp-espidf
- riscv32im-risc0-zkvm-elf
Rust 1.76.0
Language:
- Document Rust ABI compatibility between various types
- Also: guarantee that char and u32 are ABI-compatible
- Warn against ambiguous wide pointer comparisons
- Add lint ambiguous_wide_pointer_comparisons that supersedes clippy::vtable_address_comparisons
Compiler:
- Lint pinned #[must_use] pointers (in particular, Box where T is #[must_use]) in unused_must_use
- Soundness fix: fix computing the offset of an unsized field in a packed struct
- Soundness fix: fix dynamic size/align computation logic for packed types with dyn Trait tail
- Add $message_type field to distinguish json diagnostic outputs
- Enable Rust to use the EHCont security feature of Windows
- Add tier 3 {x86_64,i686}-win7-windows-msvc targets
- Add tier 3 aarch64-apple-watchos target
- Add tier 3 arm64e-apple-ios & arm64e-apple-darwin targets
- Refer to Rust's platform support page for more information on Rust's tiered platform support.
Libraries:
- Add a column number to dbg!()
- Add std::hash::{DefaultHasher, RandomState} exports
- Fix rounding issue with exponents in fmt
- Add T: ?Sized to RwLockReadGuard and RwLockWriteGuard's Debug impls
- Windows: Allow File::create to work on hidden files
Stabilized APIs:
- Arc::unwrap_or_clone
- Rc::unwrap_or_clone
- Result::inspect
- Result::inspect_err
- Option::inspect
- type_name_of_val
- std::hash::{DefaultHasher, RandomState} These were previously available only through std::collections::hash_map.
- ptr::{from_ref, from_mut}
- ptr::addr_eq
Rustdoc:
- Don't merge cfg and doc(cfg) attributes for re-exports
- rustdoc: allow resizing the sidebar / hiding the top bar
- rustdoc-search: add support for traits and associated types
- rustdoc: Add highlighting for comments in items declaration
Compatibility Notes:
- Add allow-by-default lint for unit bindings This is expected to be upgraded to a warning by default in a future Rust release. Some macros emit bindings with type () with user-provided spans, which means that this lint will warn for user code.
- Remove x86_64-sun-solaris target
- Remove asmjs-unknown-emscripten target
- Report errors in jobserver inherited through environment variables This may warn on benign problems too
- Update the minimum external LLVM to 16
- Improve print_tts This change can break some naive manual parsing of token trees in proc macro code which expect a particular structure after .to_string(), rather than just arbitrary Rust code
- Make IMPLIED_BOUNDS_ENTAILMENT into a hard error from a lint
- Vec's allocation behavior was changed when collecting some iterators Allocation behavior is currently not specified, nevertheless changes can be surprising. See impl FromIterator for Vec for more details.
- Properly reject default on free const items
Rust 1.75.0
Language:
- Stabilize async fn and return-position impl Trait in traits
- Allow function pointer signatures containing &mut T in const contexts
- Match usize/isize exhaustively with half-open ranges
- Guarantee that char has the same size and alignment as u32
- Document that the null pointer has the 0 address
- Allow partially moved values in match
- Add notes about non-compliant FP behavior on 32bit x86 targets
- Stabilize ratified RISC-V target features
Compiler:
- Rework negative coherence to properly consider impls that only partly overlap
- Bump COINDUCTIVE_OVERLAP_IN_COHERENCE to deny, and warn in dependencies
- Consider alias bounds when computing liveness in NLL
- Add the V (vector) extension to the riscv64-linux-android target spec
- Automatically enable cross-crate inlining for small functions
Add several new tier 3 targets:
- csky-unknown-linux-gnuabiv2hf
- i586-unknown-netbsd
- mipsel-unknown-netbsd
Libraries:
- Override Waker::clone_from to avoid cloning Wakers unnecessarily
- Implement BufRead for VecDeque
- Implement FusedIterator for DecodeUtf16 when the inner iterator does
- Implement Not, Bit{And,Or}{,Assign} for IP addresses
- Implement Default for ExitCode
- Guarantee representation of None in NPO
- Document when atomic loads are guaranteed read-only
- Broaden the consequences of recursive TLS initialization
- Windows: Support sub-millisecond sleep
- Fix generic bound of str::SplitInclusive's DoubleEndedIterator impl
- Fix exit status / wait status on non-Unix cfg(unix) platforms
Stabilized APIs:
- Atomic*::from_ptr
- FileTimes
- FileTimesExt
- File::set_modified
- File::set_times
- IpAddr::to_canonical
- Ipv6Addr::to_canonical
- Option::as_slice
- Option::as_mut_slice
- pointer::byte_add
- pointer::byte_offset
- pointer::byte_offset_from
- pointer::byte_sub
- pointer::wrapping_byte_add
- pointer::wrapping_byte_offset
- pointer::wrapping_byte_sub
- These APIs are now stable in const contexts:
- Ipv6Addr::to_ipv4_mapped
- MaybeUninit::assume_init_read
- MaybeUninit::zeroed
- mem::discriminant
- mem::zeroed
Cargo:
- Add new packages to [workspace.members] automatically
- Allow version-less Cargo.toml manifests
- Make browser links out of HTML file paths
Rustdoc:
- Accept less invalid Rust in rustdoc
- Document lack of object safety on affected traits
- Hide #[repr(transparent)] if it isn't part of the public ABI
- Show enum discriminant if it is a C-like variant
Compatibility Notes:
- FreeBSD targets now require at least version 12
- Formally demote tier 2 MIPS targets to tier 3
- Make misalignment a hard error in const contexts
- Fix detecting references to packed unsized fields
- Remove support for compiler plugins
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
- Optimize librustc_driver.so with BOLT
- Enable parallel rustc front end in dev and nightly builds
- Distribute rustc-codegen-cranelift as rustup component on the nightly channel
Rust 1.73.0
Language:
- Uplift clippy::fn_null_check lint as useless_ptr_null_checks
- Make noop_method_call warn by default
- Support interpolated block for try and async in macros
- Make unconditional_recursion lint detect recursive drops
- Future compatibility warning for some impls being incorrectly considered not overlapping
- The invalid_reference_casting lint is now deny-by-default (instead of allow-by-default)
Compiler:
- Write version information in a .comment section like GCC/Clang
- Add documentation on v0 symbol mangling
- Stabilize extern "thiscall" and "thiscall-unwind" ABIs
- Only check outlives goals on impl compared to trait
- Infer type in irrefutable slice patterns with fixed length as array
- Discard default auto trait impls if explicit ones exist
Add several new tier 3 targets:
- aarch64-unknown-teeos
- csky-unknown-linux-gnuabiv2
- riscv64-linux-android
- riscv64gc-unknown-hermit
- x86_64-unikraft-linux-musl
- x86_64-unknown-linux-ohos
- Add wasm32-wasi-preview1-threads as a tier 2 target
- Refer to Rust's platform support page for more information on Rust's tiered platform support
Libraries:
- Add Read, Write and Seek impls for Arc
- Merge functionality of io::Sink into io::Empty
- Implement RefUnwindSafe for Backtrace
- Make ExitStatus implement Default
- impl SliceIndex for (Bound, Bound)
- Change default panic handler message format.
- Cleaner assert_eq! & assert_ne! panic messages.
- Correct the (deprecated) Android stat struct definitions.
Stabilized APIs:
- Unsigned {integer}::div_ceil
- Unsigned {integer}::next_multiple_of
- Unsigned {integer}::checked_next_multiple_of
- std::ffi::FromBytesUntilNulError
- std::os::unix::fs::chown
- std::os::unix::fs::fchown
- std::os::unix::fs::lchown
- LocalKey::::get
- LocalKey::::set
- LocalKey::::take
- LocalKey::::replace
- LocalKey::::with_borrow
- LocalKey::::with_borrow_mut
- LocalKey::::set
- LocalKey::::take
- LocalKey::::replace
- These APIs are now stable in const contexts:
- rc::Weak::new
- sync::Weak::new
- NonNull::as_ref
Cargo:
- Encode URL params correctly for SourceId in Cargo.lock
- Bail out an error when using cargo:: in custom build script
Misc:
Compatibility Notes:
- Update the minimum external LLVM to 15
- Check for non-defining uses of return position impl Trait
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
- Remove LLVM pointee types, supporting only opaque pointers
- Port PGO/LTO/BOLT optimized build pipeline to Rust
- Replace in-tree rustc_apfloat with the new version of the crate
- Update to LLVM 17
- Add internal_features lint for internal unstable features
- Mention style for new syntax in tracking issue template
Rust 1.72.0
Language:
- Replace const eval limit by a lint and add an exponential backoff warning
- expand: Change how
- Stabilize inline asm for LoongArch64
- Uplift clippy::undropped_manually_drops lint
- Uplift clippy::invalid_utf8_in_unchecked lint
- Uplift clippy::cast_ref_to_mut lint
- Uplift clippy::cmp_nan lint
- resolve: Remove artificial import ambiguity errors
- Don't require associated types with Self: Sized bounds in dyn Trait objects
Compiler:
- Remember names of cfg-ed out items to mention them in diagnostics
- Support for native WASM exceptions
- Add support for NetBSD/aarch64-be (big-endian arm64)
- Write to stdout if - is given as output file
- Force all native libraries to be statically linked when linking a static binary
- Add Tier 3 support for loongarch64-unknown-none*
- Prevent .eh_frame from being emitted for -C panic=abort
- Support 128-bit enum variant in debuginfo codegen
- compiler: update solaris/illumos to enable tsan support
- Refer to Rust's platform support page for more information on Rust's tiered platform support
Libraries:
- Document memory orderings of thread::{park, unpark}
- io: soften ‘at most one write attempt’ requirement in io::Write::write
- Specify behavior of HashSet::insert
- Relax implicit T: Sized bounds on BufReader, BufWriter and LineWriter
- Update runtime guarantee for select_nth_unstable
- Return Ok on kill if process has already exited
- Implement PartialOrd for Vecs over different allocators
- Use 128 bits for TypeId hash
- Don't drain-on-drop in DrainFilter impls of various collections
- Make {Arc,Rc,Weak}::ptr_eq ignore pointer metadata
Rustdoc:
- Allow whitespace as path separator like double colon
- Add search result item types after their name
- Search for slices and arrays by type with []
- Clean up type unification and "unboxing"
Stabilized APIs:
- impl Sync for mpsc::Sender
- impl TryFrom<&OsStr> for &str
- String::leak
These APIs are now stable in const contexts:
- CStr::from_bytes_with_nul
- CStr::to_bytes
- CStr::to_bytes_with_nul
- CStr::to_str
Cargo:
- Enable -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
- Add support of the "default" keyword to reset previously set build.jobs parallelism back to the default
Compatibility Notes:
- Alter Display for Ipv6Addr for IPv4-compatible addresses
- Cargo changed feature name validation check to a hard error. The warning was added in Rust 1.49. These extended characters aren't allowed on crates.io, so this should only impact users of other registries, or people who don't publish to a registry
Rust 1.71.1
Fixed:
- Cargo did not respect the umask when extracting dependencies
- Fix bash completion for users of Rustup
- Do not show suspicious_double_ref_op lint when calling borrow()
- Fix ICE: substitute types before checking inlining compatibility
- Fix ICE: don't use can_eq in derive(..) suggestion for missing method
- Fix building Rust 1.71.0 from the source tarball
Rust 1.70.0
Language:
- Relax ordering rules for asm! operands
- Properly allow macro expanded format_args invocations to uses captures
- Lint ambiguous glob re-exports
- Perform const and unsafe checking for expressions in let _ = expr position
Compiler:
- Extend -Cdebuginfo with new options and named aliases This provides a smaller version of debuginfo for cases that only need line number information (-Cdebuginfo=line-tables-only), which may eventually become the default for -Cdebuginfo=1.
- Make unused_allocation lint against Box::new too
- Detect uninhabited types early in const eval
- Switch to LLD as default linker for {arm,thumb}v4t-none-eabi
- Add tier 3 target loongarch64-unknown-linux-gnu
- Add tier 3 target for i586-pc-nto-qnx700 (QNX Neutrino RTOS, version 7.0),
- Insert alignment checks for pointer dereferences as debug assertions This catches undefined behavior at runtime, and may cause existing code to fail
- Refer to Rust's platform support page for more information on Rust's tiered platform support
Libraries:
- Document NonZeroXxx layout guarantees
- Windows: make Command prefer non-verbatim paths
- Implement Default for some alloc/core iterators
- Fix handling of trailing bare CR in str::lines
- allow negative numeric literals in concat!
- Add documentation about the memory layout of Cell
- Use partial_cmp to implement tuple lt/le/ge/gt
- Stabilize atomic_as_ptr
- Stabilize nonnull_slice_from_raw_parts
- Partial stabilization of once_cell
- Stabilize nonzero_min_max
- Flatten/inline format_args!() and (string and int) literal arguments into format_args!()
- Stabilize movbe target feature
- don't splice from files into pipes in io::copy
- Add a builtin unstable 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.
Stabilized APIs:
- 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:
- Add CARGO_PKG_README
- Make sparse the default protocol for crates.io
- Accurately show status when downgrading dependencies
- Use registry.default for login/logout
- Stabilize cargo logout
Misc:
- Stabilize rustdoc --test-run-directory
Compatibility Notes:
- Prevent stable libtest from supporting -Zunstable-options
- Perform const and unsafe checking for expressions in let _ = expr position
- WebAssembly targets enable sign-ext and mutable-globals features in codegen This may cause incompatibility with older execution environments
- Insert alignment checks for pointer dereferences as debug assertions This catches undefined behavior at runtime, and may cause existing code to fail
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
- Upgrade to LLVM 16
- Use SipHash-1-3 instead of SipHash-2-4 for StableHasher
Rust 1.69.0
Language:
- Deriving built-in traits on packed structs works with Copy fields
- Stabilize the cmpxchg16b target feature on x86 and x86_64
- Improve analysis of trait bounds for associated types
- Allow associated types to be used as union fields
- Allow Self: Autotrait bounds on dyn-safe trait methods
- Treat str as containing [u8] for auto trait purposes
Compiler:
- Upgrade *-pc-windows-gnu on CI to mingw-w64 v10 and GCC 12.2
- Rework min_choice algorithm of member constraints
- Support true and false as boolean flags in compiler arguments
- Default repr(C) enums to c_int size
Libraries:
- Implement the unstable DispatchFromDyn for cell types, allowing downstream experimentation with custom method receivers
- Document that fmt::Arguments::as_str() may return Some(_) in more cases after optimization, subject to change
- Implement AsFd and AsRawFd for Rc
Stabilized APIs:
- CStr::from_bytes_until_nul
- Core::ffi::FromBytesUntilNulError
- 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:
- Cargo now suggests cargo fix or cargo clippy --fix when compilation warnings are auto-fixable
- Cargo now suggests cargo add if you try to install a library crate
- Cargo now sets the CARGO_BIN_NAME environment variable also for binary examples
Rustdoc:
- Vertically compact trait bound formatting
- Only include stable lints in rustdoc::all group
- Compute maximum Levenshtein distance based on the query
- Remove inconsistently-present sidebar tooltips
- Search by macro when query ends with !
Compatibility Notes:
- The 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.
- Unaligned references to packed fields are now a hard error. This has been a warning since 1.53, and denied by default with a future-compatibility warning since 1.62.
- Update the minimum external LLVM to 14
- Cargo now emits errors on invalid characters in a registry token
- When 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 denies 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.
- Debuginfo for build dependencies is now off if not explicitly set. This is expected to improve the overall build time.
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.
- Move format_args!() into AST (and expand it during AST lowering)
Rust 1.68.2
- Update the GitHub RSA host key bundled within Cargo. The key was rotated by GitHub on 2023-03-24 after the old one leaked.
- Mark the old GitHub RSA host key as revoked. This will prevent Cargo from accepting the leaked key even when trusted by the system.
- Add support for @revoked and a better error message for @cert-authority in Cargo's SSH host key verification
Rust 1.68.0
Language:
- Stabilize default_alloc_error_handler This allows usage of alloc on stable without requiring the definition of a handler for allocation failure. Defining custom handlers is still unstable.
- Stabilize efiapi calling convention
- Remove implicit promotion for types with drop glue
Compiler:
- Change bindings_with_variant_name to deny-by-default
- Allow .. to be parsed as let initializer
- Add armv7-sony-vita-newlibeabihf as a tier 3 target
- Always check alignment during compile-time const evaluation
- Disable "split dwarf inlining" by default
- Add vendor to Fuchsia's target triple
- Enable sanitizers for s390x-linux
Libraries:
- Loosen the bound on the Debug implementation of Weak.
- Make std::task::Context !Send and !Sync
- PhantomData layout guarantees
- Don't derive Debug for OnceWith & RepeatWith
- Implement DerefMut for PathBuf
- Add O(1) Vec -> VecDeque conversion guarantee
- Leak amplification for peek_mut() to ensure BinaryHeap's invariant is always met
Stabilized APIs:
- {core,std}::pin::pin!
- impl From for {f32,f64}
- std::path::MAIN_SEPARATOR_STR
- impl DerefMut for PathBuf
These APIs are now stable in const contexts:
- VecDeque::new
Cargo:
- Stabilize sparse registry support for crates.io
- cargo build --verbose tells you more about why it recompiles
- Show progress of crates.io index update even net.git-fetch-with-cli option enabled
Misc:
- Compatibility Notes:
- Add SEMICOLON_IN_EXPRESSIONS_FROM_MACROS to future-incompat report
- Only specify --target by default for -Zgcc-ld=lld on wasm
- Bump IMPLIED_BOUNDS_ENTAILMENT to Deny + ReportNow
- std::task::Context no longer implements Send and Sync
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.
- Encode spans relative to the enclosing item
- Don't normalize in AstConv
- Find the right lower bound region in the scenario of partial order relations
- Fix impl block in const expr
- Check ADT fields for copy implementations considering regions
- rustdoc: simplify JS search routine by not messing with lev distance
- Enable ThinLTO for rustc on x86_64-pc-windows-msvc
- Enable ThinLTO for rustc on x86_64-apple-darwin
Rust 1.66.1
- Fixes Cargo not verifying SSH host keys when cloning dependencies or registry indexes with SSH
Rust 1.66.0
Language:
- Permit specifying explicit discriminants on all repr(Int) enums
- Allow transmutes between the same type differing only in lifetimes
- Change constant evaluation errors from a deny-by-default lint to a hard error
- Trigger must_use on impl Trait for supertraits This makes impl ExactSizeIterator respect the existing #[must_use] annotation on Iterator
- Allow ..=X in patterns
- Uplift clippy::for_loops_over_fallibles lint into rustc
- Stabilize sym operands in inline assembly
- Update to Unicode 15
- Opaque types no longer imply lifetime bounds This is a soundness fix which may break code that was erroneously relying on this behavior
Compiler:
- Add armv5te-none-eabi and thumbv5te-none-eabi tier 3 targets
- Refer to Rust's platform support page for more information on Rust's tiered platform support
- Add support for linking against macOS universal libraries
Libraries:
- Fix #[derive(Default)] on a generic #[default] enum adding unnecessary Default bounds
- Update to Unicode 15
Stabilized APIs:
- proc_macro::Span::source_text
- uX::{checked_add_signed, overflowing_add_signed, saturating_add_signed, wrapping_add_signed}
- iX::{checked_add_unsigned, overflowing_add_unsigned, saturating_add_unsigned, wrapping_add_unsigned}
- iX::{checked_sub_unsigned, overflowing_sub_unsigned, saturating_sub_unsigned, wrapping_sub_unsigned}
- BTreeSet::{first, last, pop_first, pop_last}
- BTreeMap::{first_key_value, last_key_value, first_entry, last_entry, pop_first, pop_last}
- Add AsFd implementations for stdio lock types on WASI.
- impl TryFrom for Box
- core::hint::black_box
- Duration::try_from_secs_{f32,f64}
- Option::unzip
- std::os::fd
Rustdoc:
- Add Rustdoc warning for invalid HTML tags in the documentation
Cargo:
- Added cargo remove to remove dependencies from Cargo.toml
- cargo publish now waits for the new version to be downloadable before exiting
- Compatibility Notes:
- Only apply ProceduralMasquerade hack to older versions of rental
- Don't export __heap_base and __data_end on wasm32-wasi
- Don't export __wasm_init_memory on WebAssembly
- Only export __tls_* on wasm32-unknown-unknown
- Don't link to libresolv in libstd on Darwin
- Update libstd's libc to 0.2.135 (to make libstd no longer pull in libiconv.dylib on Darwin)
- Opaque types no longer imply lifetime bounds This is a soundness fix which may break code that was erroneously relying on this behavior.
- Make order_dependent_trait_objects show up in future-breakage reports
- Change std::process::Command spawning to default to inheriting the parent's signal mask
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.
- Enable BOLT for LLVM compilation
- Enable LTO for rustc_driver.so
Rust 1.65.0
Language:
- Error on as casts of enums with #[non_exhaustive] variants
- Stabilize let else
- Stabilize generic associated types (GATs)
- Add lints let_underscore_drop and let_underscore_lock from Clippy
- Stabilize breaking from arbitrary labeled blocks ("label-break-value")
- Uninitialized integers, floats, and raw pointers are now considered immediate UB. Usage of MaybeUninit is the correct way to work with uninitialized memory.
- Stabilize raw-dylib for Windows x86_64, aarch64, and thumbv7a
- Do not allow Drop impl on foreign ADTs
Compiler:
- Stabilize -Csplit-debuginfo on Linux
- Use niche-filling optimization even when multiple variants have data
- Associated type projections are now verified to be well-formed prior to resolving the underlying type
- Stringify non-shorthand visibility correctly
- Normalize struct field types when unsizing
- Update to LLVM 15
- Fix aarch64 call abi to correctly zeroext when needed
- debuginfo: Generalize C++-like encoding for enums
- Add special_module_name lint
- Add support for generating unique profraw files by default when using -C instrument-coverage
- Allow dynamic linking for iOS/tvOS targets
New targets:
- Add armv4t-none-eabi as a tier 3 target
- Add powerpc64-unknown-openbsd and riscv64-unknown-openbsd as tier 3 targets
- Refer to Rust's platform support page for more information on Rust's tiered platform support
Libraries:
- Don't generate PartialEq::ne in derive(PartialEq)
- Windows RNG: Use BCRYPT_RNG_ALG_HANDLE by default
- Forbid mixing System with direct system allocator calls
- Document no support for writing to non-blocking stdio/stderr
- std::layout::Layout size must not overflow isize::MAX when rounded up to align This also changes the safety conditions on Layout::from_size_align_unchecked.
Stabilized APIs:
- std::backtrace::Backtrace
- Bound::as_ref
- std::io::read_to_string
- ::cast_mut
- ::cast_const
These APIs are now stable in const contexts:
- ::offset_from
- ::offset_from
Cargo:
- Apply GitHub fast path even for partial hashes
- Do not add home bin path to PATH if it's already there
- Take priority into account within the pending queue. This slightly optimizes job scheduling by Cargo, with typically small improvements on larger crate graph builds.
Compatibility Notes:
- std::layout::Layout size must not overflow isize::MAX when rounded up to align. This also changes the safety conditions on Layout::from_size_align_unchecked.
- PollFn now only implements Unpin if the closure is Unpin. This is a possible breaking change if users were relying on the blanket unpin implementation. See discussion on the PR for details of why this change was made.
- Drop ExactSizeIterator impl from std::char::EscapeAscii This is a backwards-incompatible change to the standard library's surface area, but is unlikely to affect real world usage.
- Do not consider a single repeated lifetime eligible for elision in the return type This behavior was unintentionally changed in 1.64.0, and this release reverts that change by making this an error again.
- Reenable disabled early syntax gates as future-incompatibility lints
- Update the minimum external LLVM to 13
- Don't duplicate file descriptors into stdio fds
- Sunset RLS
- Deny usage of #![cfg_attr(..., crate_type = ...)] to set the crate type This strengthens the forward compatibility lint deprecated_cfg_attr_crate_type_name to deny.
- llvm-has-rust-patches allows setting the build system to treat the LLVM as having Rust-specific patches This option may need to be set for distributions that are building Rust with a patched LLVM via llvm-config, not the built-in LLVM.
- Combining three or more languages (e.g. Objective C, C++ and Rust) into one binary may hit linker limitations when using lld. For more information, see issue 102754.
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.
- Add x.sh and x.ps1 shell scripts
- compiletest: use target cfg instead of hard-coded tables
- Use object instead of LLVM for reading bitcode from rlibs
- Enable MIR inlining for optimized compilations This provides a 3-10% improvement in compiletimes for real world crates. See perf results.
Rust 1.63.0
Language:
- Remove migrate borrowck mode for pre-NLL errors
- Modify MIR building to drop repeat expressions with length zero
- Remove label/lifetime shadowing warnings
- Allow explicit generic arguments in the presence of impl Trait args
- Make cenum_impl_drop_cast warnings deny-by-default
- Prevent unwinding when -C panic=abort is used regardless of declared ABI
- Lub: don't bail out due to empty binders
Compiler:
- Stabilize the bundle native library modifier, also removing the deprecated static-nobundle linking kind
- Add Apple WatchOS compile targets*
- Add a Windows application manifest to rustc-main
- Refer to Rust's platform support page for more information on Rust's tiered platform support
Libraries:
- Implement Copy, Clone, PartialEq and Eq for core::fmt::Alignment
- Extend ptr::null and null_mut to all thin (including extern) types
- Impl Read and Write for VecDeque
- STD support for the Nintendo 3DS
- Make write/print macros eagerly drop temporaries
- Implement internal traits that enable [OsStr]::join
- Implement Hash for core::alloc::Layout
- Add capacity documentation for OsString
- Put a bound on collection misbehavior
- Make std::mem::needs_drop accept ?Sized
- Impl Termination for Infallible and then make the Result impls of Termination more generic
- Document Rust's stance on /proc/self/mem
Stabilized APIs:
- Array::from_fn
- Box::into_pin
- BinaryHeap::try_reserve
- BinaryHeap::try_reserve_exact
- OsString::try_reserve
- OsString::try_reserve_exact
- PathBuf::try_reserve
- PathBuf::try_reserve_exact
- Path::try_exists
- Ref::filter_map
- RefMut::filter_map
- NonNull::<[T]>::len
- ToOwned::clone_into
- Ipv6Addr::to_ipv4_mapped
- Unix::io::AsFd
- Unix::io::BorrowedFd<'fd>
- Unix::io::OwnedFd
- Windows::io::AsHandle
- Windows::io::BorrowedHandle<'handle>
- Windows::io::OwnedHandle
- Windows::io::HandleOrInvalid
- Windows::io::HandleOrNull
- Windows::io::InvalidHandleError
- Windows::io::NullHandleError
- Windows::io::AsSocket
- Windows::io::BorrowedSocket<'handle>
- Windows::io::OwnedSocket
- Thread::scope
- Thread::Scope
- Thread::ScopedJoinHandle
These APIs are now usable in const contexts:
- Array::from_ref
- Slice::from_ref
- Intrinsics::copy
- Intrinsics::copy_nonoverlapping
- <*const T>::copy_to
- <*const T>::copy_to_nonoverlapping
- <*mut T>::copy_to
- <*mut T>::copy_to_nonoverlapping
- <*mut T>::copy_from
- <*mut T>::copy_from_nonoverlapping
- Str::from_utf8
- Utf8Error::error_len
- Utf8Error::valid_up_to
- Condvar::new
- Mutex::new
- RwLock::new
Cargo:
- Stabilize the --config path command-line argument
- Expose rust-version in the environment as CARGO_PKG_RUST_VERSION
Rust 1.62.0
Language:
- Stabilize #[derive(Default)] on enums with a #[default] variant
- Stop validating some checks in dead code after functions with uninhabited return types
- Fix constants not getting dropped if part of a diverging expression
- Support unit struct/enum variant in destructuring assignment
- Remove mutable_borrow_reservation_conflict lint and allow the code pattern
Compiler:
- linker: Stop using whole-archive on dependencies of dylibs
- Make unaligned_references lint deny-by-default This lint is also a future compatibility lint, and is expected to eventually become a hard error.
- Only add codegen backend to dep info if -Zbinary-dep-depinfo is used
- Reject #[thread_local] attribute on non-static items
- Add tier 3 aarch64-pc-windows-gnullvm and x86_64-pc-windows-gnullvm targets*
- Implement a lint to warn about unused macro rules
- Promote x86_64-unknown-none target to Tier 2*
Libraries:
- Windows: Use a pipe relay for chaining pipes
- Replace Linux Mutex and Condvar with futex based ones
- Replace RwLock by a futex based one on Linux
- std: directly use pthread in UNIX parker implementation
Stabilized APIs:
- bool::then_some
- f32::total_cmp
- f64::total_cmp
- Stdin::lines
- windows::CommandExt::raw_arg
- impl Default for AssertUnwindSafe
- From for Rc<[u8]>
- From for Arc<[u8]>
- FusedIterator for EncodeWide
- RDM intrinsics on aarch64
Clippy:
- Create clippy lint against unexpectedly late drop for temporaries in match scrutinee expressions
Cargo:
- Added the cargo add command for adding dependencies to Cargo.toml from the command-line. docs
- Package ID specs now support name@version syntax in addition to the previous name:version to align with the behavior in cargo add and other tools. cargo install and cargo yank also now support this syntax so the version does not need to passed as a separate flag.
- The git and registry directories in Cargo's home directory (usually ~/.cargo) are now marked as cache directories so that they are not included in backups or content indexing (on Windows).
- Added automatic @ argfile support, which will use "response files" if the command-line to rustc exceeds the operating system's limit.
Compatibility Notes:
- cargo test now passes --target to rustdoc if the specified target is the same as the host target
- rustdoc: Remove .woff font files
- Enforce Copy bounds for repeat elements while considering lifetimes
Internal Changes:
- Unify ReentrantMutex implementations across all platforms
Rust 1.61.0
- Custom exit codes from main
- More capabilities for const fn
- Static handles for locked stdio
- Stabilized APIs
- Other changes
Rust 1.58.1
- The non_send_fields_in_send_ty Clippy lint was discovered to have too many false positives and has been moved to the experimental lints group (called "nursery")
- The useless_format Clippy lint has been updated to handle captured identifiers in format strings, introduced in Rust 1.58.0
- A regression in Rustfmt preventing generated files from being formatted when passed through the standard input has been fixed
- An incorrect error message displayed by rustc in some cases has been fixed
Rust 1.58.0
Language:
- Format strings can now capture arguments simply by writing {ident} in the string. This works in all macros accepting format strings. Support for this in panic! (panic!("{ident}")) requires the 2021 edition; panic invocations in previous editions that appear to be trying to use this will result in a warning lint about not having the intended effect.
- const T pointers can now be dereferenced in const contexts
- The rules for when a generic struct implements Unsize have been relaxed
Compiler:
- Add LLVM CFI support to the Rust compiler
- Stabilize -Z strip as -C strip. Note that while release builds already don't add debug symbols for the code you compile, the compiled standard library that ships with Rust includes debug symbols, so you may want to use the strip option to remove these symbols to produce smaller release binaries. Note that this release only includes support in rustc, not directly in cargo.
- Add support for LLVM coverage mapping format versions 5 and 6
- Emit LLVM optimization remarks when enabled with -Cremark
- Update the minimum external LLVM to 12
- Add x86_64-unknown-none at Tier 3*
- Build musl dist artifacts with debuginfo enabled. When building release binaries using musl, you may want to use the newly stabilized strip option to remove these debug symbols, reducing the size of your binaries.
- Don't abort compilation after giving a lint error
- Error messages point at the source of trait bound obligations in more places
- Refer to Rust's platform support page for more information on Rust's tiered platform support.
Libraries:
- All remaining functions in the standard library have #[must_use] annotations where appropriate, producing a warning when ignoring their return value. This helps catch mistakes such as expecting a function to mutate a value in place rather than return a new value.
- Paths are automatically canonicalized on Windows for operations that support it
- Re-enable debug checks for copy and copy_nonoverlapping
- Implement RefUnwindSafe for Rc
- Make RSplit<T, P>: Clone not require T: Clone
- Implement Termination for Result<Infallible, E>. This allows writing fn main() -> Result<Infallible, ErrorType>, for a program whose successful exits never involve returning from main (for instance, a program that calls exit, or that uses exec to run another program).
Stabilized APIs:
- Metadata::is_symlink
- Path::is_symlink
- {integer}::saturating_div
- Option::unwrap_unchecked
- Result::unwrap_unchecked
- Result::unwrap_err_unchecked
- NonZero{unsigned}::is_power_of_two
- File::options
- These APIs are now usable in const contexts:
- Duration::new
- Duration::checked_add
- Duration::saturating_add
- Duration::checked_sub
- Duration::saturating_sub
- Duration::checked_mul
- Duration::saturating_mul
- Duration::checked_div
- MaybeUninit::as_ptr
- MaybeUninit::as_mut_ptr
- MaybeUninit::assume_init
- MaybeUninit::assume_init_ref
Cargo:
- Add --message-format for install command
- Warn when alias shadows external subcommand
Rustdoc:
- Show all Deref implementations recursively in rustdoc
- Use computed visibility in rustdoc
Compatibility Notes:
- Try all stable method candidates first before trying unstable ones. This change ensures that adding new nightly-only methods to the Rust standard library will not break code invoking methods of the same name from traits outside the standard library.
- Windows: std::process::Command will no longer search the current directory for executables.
- All proc-macro backward-compatibility lints are now deny-by-default.
- proc_macro: Append .0 to unsuffixed float if it would otherwise become int token
- Refactor weak symbols in std::sys::unix. This optimizes accesses to glibc functions, by avoiding the use of dlopen. This does not increase the minimum expected version of glibc. However, software distributions that use symbol versions to detect library dependencies, and which take weak symbols into account in that analysis, may detect rust binaries as requiring newer versions of glibc.
- rustdoc now rejects some unexpected semicolons in doctests
Internal Changes:
- These changes provide no direct user facing benefits, but represent significant improvements to the internals and overall performance of rustc and related tools.
- Implement coherence checks for negative trait impls
- Add rustc lint, warning when iterating over hashmaps
- Optimize live point computation
- Enable verification for 1/32nd of queries loaded from disk
- Implement version of normalize_erasing_regions that allows for normalization failure
Rust 1.57.0
Language:
- Macro attributes may follow #[derive] and will see the original (pre-cfg) input
- Accept curly-brace macros in expressions, like m!{ .. }.method() and m!{ .. }?
- Allow panicking in constant evaluation
Compiler:
- Create more accurate debuginfo for vtables
- Add armv6k-nintendo-3ds at Tier 3*
- Add armv7-unknown-linux-uclibceabihf at Tier 3*
- Add m68k-unknown-linux-gnu at Tier 3*
- Add SOLID targets at Tier 3*: aarch64-kmc-solid_asp3, armv7a-kmc-solid_asp3-eabi, armv7a-kmc-solid_asp3-eabihf
- Refer to Rust's platform support page for more information on Rust's tiered platform support
Libraries:
- Avoid allocations and copying in Vec::leak
- Add #[repr(i8)] to Ordering
- Optimize File::read_to_end and read_to_string
- Update to Unicode 14.0
- Many more functions are marked #[must_use], producing a warning when ignoring their return value. This helps catch mistakes such as expecting a function to mutate a value in place rather than return a new value.
Stabilised APIs:
- [T; N]::as_mut_slice
- [T; N]::as_slice
- collections::TryReserveError
- HashMap::try_reserve
- HashSet::try_reserve
- String::try_reserve
- String::try_reserve_exact
- Vec::try_reserve
- Vec::try_reserve_exact
- VecDeque::try_reserve
- VecDeque::try_reserve_exact
- Iterator::map_while
- iter::MapWhile
- proc_macro::is_available
- Command::get_program
- Command::get_args
- Command::get_envs
- Command::get_current_dir
- CommandArgs
- CommandEnvs
- These APIs are now usable in const contexts:
- hint::unreachable_unchecked
Cargo:
- Stabilize custom profiles
- Compatibility notes
Internal changes:
- These changes provide no direct user facing benefits, but represent significant improvements to the internals and overall performance of rustc and related tools
- Added an experimental backend for codegen with libgccjit
Rust 1.55.0
Language:
- You can now write open "from" range patterns (X..), which will start at X and will end at the maximum value of the integer
- You can now explicitly import the prelude of different editions through std::prelude (e.g. use std::prelude::rust_2021::*;).
Compiler:
- Added tier 3* support for powerpc64le-unknown-freebsd
- * Refer to Rust's platform support page for more information on Rust's tiered platform support
- Libraries
- Updated std's float parsing to use the Eisel-Lemire algorithm. These improvements should in general provide faster string parsing of floats, no longer reject certain valid floating point values, and reduce the produced code size for non-stripped artifacts.
- string::Drain now implements AsRef and AsRef<[u8]>.
Stabilised APIs:
- Bound::cloned
- Drain::as_str
- IntoInnerError::into_error
- IntoInnerError::into_parts
- MaybeUninit::assume_init_mut
- MaybeUninit::assume_init_ref
- MaybeUninit::write
- array::map
- ops::ControlFlow
- x86::_bittest
- x86::_bittestandcomplement
- x86::_bittestandreset
- x86::_bittestandset
- x86_64::_bittest64
- x86_64::_bittestandcomplement64
- x86_64::_bittestandreset64
- x86_64::_bittestandset64
Cargo:
- Cargo will now deduplicate compiler diagnostics to the terminal when invoking rustc in parallel such as when using cargo test
- The package definition in cargo metadata now includes the "default_run" field from the manifest
- Added cargo d as an alias for cargo doc
- Added {lib} as formatting option for cargo tree to print the "lib_name" of packages
Rustdoc:
- Added "Go to item on exact match" search option
- The "Implementors" section on traits no longer shows redundant method definitions
- Trait implementations are toggled open by default. This should make the implementations more searchable by tools like CTRL+F in your browser.
- Intra-doc links should now correctly resolve associated items (e.g. methods) through type aliases
- Traits which are marked with #[doc(hidden)] will no longer appear in the "Trait Implementations" section
Rust 1.54.0
Language:
- You can now use macros for values in built-in attribute macros. While a seemingly minor addition on its own, this enables a lot of powerful functionality when combined correctly. Most notably you can now include external documentation in your crate by writing the following.
- #![doc = include_str!("README.md")]
You can also use this to include auto-generated modules:
- #[path = concat!(env!("OUT_DIR"), "/generated.rs")] mod generated
- You can now cast between unsized slice types (and types which contain unsized slices) in const fn
- You can now use multiple generic lifetimes with impl Trait where the lifetimes don't explicitly outlive another. In code this means that you can now have impl Trait<'a, 'b> where as before you could only have impl Trait<'a, 'b> where 'b: 'a.
Compiler:
- Rustc will now search for custom JSON targets in /lib/rustlib//target.json where / is the "sysroot" directory. You can find your sysroot directory by running rustc --print sysroot.
- Added wasm as a target_family for WebAssembly platforms
- You can now use #[target_feature] on safe functions when targeting WebAssembly platforms
- Improved debugger output for enums on Windows MSVC platforms
- Added tier 3* support for bpfel-unknown-none and bpfeb-unknown-none
- Refer to Rust's platform support page for more information on Rust's tiered platform support
Libraries:
- Panic::panic_any will now #[track_caller]
- Added OutOfMemory as a variant of io::ErrorKind
- Proc_macro::Literal now implements FromStr
- The implementations of vendor intrinsics in core::arch have been significantly refactored. The main user-visible changes are a 50% reduction in the size of libcore.rlib and stricter validation of constant operands passed to intrinsics. The latter is technically a breaking change, but allows Rust to more closely match the C vendor intrinsics API.
- Stabilized APIs:
- BTreeMap::into_keys
- BTreeMap::into_values
- HashMap::into_keys
- HashMap::into_values
- Arch::wasm32
- VecDeque::binary_search
- VecDeque::binary_search_by
- VecDeque::binary_search_by_key
- VecDeque::partition_point
Cargo:
- Added the --prune option to cargo-tree to remove a package from the dependency graph
- Added the --depth option to cargo-tree to print only to a certain depth in the tree
- Added the no-proc-macro value to cargo-tree --edges to hide procedural macro dependencies
- A new environment variable named CARGO_TARGET_TMPDIR is available. This variable points to a directory that integration tests and benches can use as a "scratchpad" for testing filesystem operations.
Compatibility Notes:
- Mixing Option and Result via ? is no longer permitted in closures for inferred types
- Previously unsound code is no longer permitted where different constructors in branches could require different lifetimes
- As previously mentioned the std::arch instrinsics now uses stricter const checking than before and may reject some previously accepted code
- I128 multiplication on Cortex M0+ platforms currently unconditionally causes overflow when compiled with codegen-units = 1
Rust 1.53.0
Language:
- You can now use unicode for identifiers. This allows multilingual identifiers but still doesn't allow glyphs that are not considered characters. More specifically you can now use any identifier that matches the UAX #31 "Unicode Identifier and Pattern Syntax" standard. This is the same standard as languages like Python, however Rust uses NFC normalization which may be different from other languages.
- You can now specify "or patterns" inside pattern matches. Previously you could only use | (OR) on complete patterns. E.g.
- Added the :pat_param macro_rules! matcher. This matcher has the same semantics as the :pat matcher. This is to allow :pat to change semantics to being a pattern fragment in a future edition.
Compiler:
- Updated the minimum external LLVM version to LLVM 10
- Added Tier 3* support for the wasm64-unknown-unknown target
- Improved debuginfo for closures and async functions on Windows MSVC
Libraries:
- Abort messages will now forward to android_set_abort_message on Android platforms when available
- slice::IterMut<'_, T> now implements AsRef<[T]>
- Arrays of any length now implement IntoIterator. Currently calling .into_iter() as a method on an array will return impl Iterator<Item=&T>, but this may change in a future edition to change Item to T. Calling IntoIterator::into_iter directly on arrays will provide impl Iterator<Item=T> as expected.
- leading_zeros, and trailing_zeros are now available on all NonZero integer types.
- {f32, f64}::from_str now parse and print special values (NaN, -0) according to IEEE RFC 754.
- You can now index into slices using (Bound, Bound)
- Add the BITS associated constant to all numeric types
Rust 1.52.1
- Change log not available for this version
Rust 1.52.0
Language:
- Added the unsafe_op_in_unsafe_fn lint, which checks whether the unsafe code in an unsafe fn is wrapped in a unsafe block. This lint is allowed by default, and may become a warning or hard error in a future edition.
- You can now cast mutable references to arrays to a pointer of the same type as the element
Compiler:
- Upgraded the default LLVM to LLVM 12
Added tier 3* support for the following targets:
- s390x-unknown-linux-musl
- riscv32gc-unknown-linux-musl & riscv64gc-unknown-linux-musl
- powerpc-unknown-openbsd
- Refer to Rust's platform support page for more information on Rust's tiered platform support
Libraries:
- OsString now implements Extend and FromIterator
- cmp::Reverse now has #[repr(transparent)] representation
- Arc now implements error::Error
- All integer division and remainder operations are now const
Stabilised APIs:
- Arguments::as_str
- char::MAX
- char::REPLACEMENT_CHARACTER
- char::UNICODE_VERSION
- char::decode_utf16
- char::from_digit
- char::from_u32_unchecked
- char::from_u32
- slice::partition_point
- str::rsplit_once
- str::split_once
- The following previously stable APIs are now const.:
- char::len_utf8
- char::len_utf16
- char::to_ascii_uppercase
- char::to_ascii_lowercase
- char::eq_ignore_ascii_case
- u8::to_ascii_uppercase
- u8::to_ascii_lowercase
- u8::eq_ignore_ascii_case
Rustdoc:
- Rustdoc lints are now treated as a tool lint, meaning that lints are now prefixed with rustdoc:: (e.g. #[warn(rustdoc::non_autolinks)]). Using the old style is still allowed, and will become a warning in a future release.
- Rustdoc now supports argument files
- Rustdoc now generates smart punctuation for documentation
- You can now use "task lists" in Rustdoc Markdown
Misc:
- You can now pass multiple filters to tests. E.g. cargo test -- foo bar will run all tests that match foo and bar
- Rustup now distributes PDB symbols for the std library on Windows, allowing you to see std symbols when debugging
Internal Only:
- These changes provide no direct user facing benefits, but represent significant improvements to the internals and overall performance of rustc and related tools
- Check the result cache before the DepGraph when ensuring queries
- Try fast_reject::simplify_type in coherence before doing full check
- Only store a LocalDefId in some HIR nodes
- Store HIR attributes in a side table
Compatibility Notes:
- Cargo build scripts are now forbidden from setting RUSTC_BOOTSTRAP
- Removed support for the x86_64-rumprun-netbsd target
- Deprecated the x86_64-sun-solaris target in favor of x86_64-pc-solaris
- Rustdoc now only accepts ,, , and t as delimiters for specifying languages in code blocks
- Rustc now catches more cases of pub_use_of_private_extern_crate
- Changes in how proc macros handle whitespace may lead to panics when used with older proc-macro-hack versions. A cargo update should be sufficient to fix this in all cases.
Rust 1.51.0
Language:
- You can now parameterize items such as functions, traits, and structs by constant values in addition to by types and lifetimes. Also known as "const generics" E.g. you can now write the following. Note: Only values of primitive integers, bool, or char types are currently permitted.
Compiler:
- Added the -Csplit-debuginfo codegen option for macOS platforms. This option controls whether debug information is split across multiple files or packed into a single file. Note This option is unstable on other platforms.
- Added tier 3* support for aarch64_be-unknown-linux-gnu, aarch64-unknown-linux-gnu_ilp32, and aarch64_be-unknown-linux-gnu_ilp32 targets
- Added tier 3 support for i386-unknown-linux-gnu and i486-unknown-linux-gnu targets
- The target-cpu=native option will now detect individual features of CPUs
- Refer to Rust's platform support page for more information on Rust's tiered platform support
Libraries:
- Box::downcast is now also implemented for any dyn Any + Send + Sync object
- str now implements AsMut
- u64 and u128 now implement From
- Error is now implemented for &T where T implements Error
- Poll::{map_ok, map_err} are now implemented for Poll
- unsigned_abs is now implemented for all signed integer types
- io::Empty now implements io::Seek
- rc::Weak and sync::Weak's methods such as as_ptr are now implemented for T: ?Sized types
- Stabilized APIs:
- Arc::decrement_strong_count
- Arc::increment_strong_count
- Once::call_once_force
- Peekable::next_if_eq
- Peekable::next_if
- Seek::stream_position
- array::IntoIter
- panic::panic_any<
- OperaOpera 115.0 Build 5322.109 (64-bit)
- 4K Download4K Video Downloader+ 1.10.3 (64-bit)
- PhotoshopAdobe Photoshop CC 2025 26.2 (64-bit)
- OKXOKX - Buy Bitcoin or Ethereum
- iTop VPNiTop VPN 6.2.0 - Fast, Safe & Secure
- Premiere ProAdobe Premiere Pro CC 2025 25.1
- BlueStacksBlueStacks 10.41.642.1001
- Hero WarsHero Wars - Online Action Game
- TradingViewTradingView - Trusted by 60 Million Traders
- LockWiperiMyFone LockWiper (Android) 5.7.2
Comments and User Reviews