← Back to all releases

Rust 1.68.0

Released on March 9, 2023

What's Changed

Full Changelog

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

-------------------

- Only support Android NDK 25 or newer

- 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