Rust 1.77.0
Released on March 21, 2024
What's Changed
- Reveal opaque types within the defining body for exhaustiveness checking.
- Stabilize C-string literals.
- Stabilize THIR unsafeck.
- Add lint
static_mut_refsto warn on references to mutable statics. - Support async recursive calls (as long as they have indirection).
- Undeprecate lint
unstable_featuresand make use of it in the compiler. - Make inductive cycles in coherence ambiguous always.
- Get rid of type-driven traversal in const-eval interning,
- Deny braced macro invocations in let-else.
- Include lint
soft_unstablein future breakage reports. - Make
i128andu12816-byte aligned on x86-based targets. - Use
--verbosein diagnostic output. - Improve spacing between printed tokens.
- Merge the
unused_tuple_struct_fieldslint intodead_code. - Error on incorrect implied bounds in well-formedness check,
- Fix coverage instrumentation/reports for non-ASCII source code.
- Fix
fn/constitems implied bounds and well-formedness check. - Promote
riscv32{im|imafc}-unknown-none-elftargets to tier 2. - Add several new tier 3 targets:
aarch64-unknown-illumoshexagon-unknown-none-elfriscv32imafc-esp-espidfriscv32im-risc0-zkvm-elf
- Implement
From<&[T; N]>forCow<[T]>. - Remove special-case handling of
vec.split_off(0). array::each_refarray::each_mutcore::netf32::round_ties_evenf64::round_ties_evenmem::offset_of!slice::first_chunkslice::first_chunk_mutslice::split_first_chunkslice::split_first_chunk_mutslice::last_chunkslice::last_chunk_mutslice::split_last_chunkslice::split_last_chunk_mutslice::chunk_byslice::chunk_by_mutBound::mapFile::create_newMutex::clear_poisonRwLock::clear_poison
Full Changelog
Language
--------
- Reveal opaque types within the defining body for exhaustiveness checking.
- Stabilize C-string literals.
- 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 compatibility 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:
Refer to Rust's [platform support page][platform-support-doc]
for more information on Rust's tiered platform support.
Libraries
---------
- Implement From<&[T; N]> for Cow<[T]>.
- Remove special-case handling of vec.split_off(0).
Stabilized APIs
---------------
- slice::split_first_chunk_mut
Cargo
-----
- Extend the build directive syntax with cargo::.
- Stabilize metadata id format as PackageIDSpec.
- Pull out cargo-util-schemas as a crate.
- Strip all debuginfo when debuginfo is not requested.
- Inherit jobserver from env for all kinds of runners.
- Deprecate rustc plugin support in cargo.
Rustdoc
-----
- Allows links in markdown headings.
- Search for tuples and unit by type with ().
- Clean up the source sidebar's hide button.
- Prevent JS injection from localStorage.
Misc
----
- Recommend version-sorting for all sorting in style guide.
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.