Brief summary of Rust releases
Posted on Nov. 5, 2023 by Ben Dickson.
A brief summary of the interesting-to-me bits of each Rust release. Shall be updated over time, probably.
Longer notes obvious at https://github.com/rust-lang/rust/releases
1.80
LazyCellandLazyLock- delays initialization untill first accessed- Unexpected values in
#[cfg(...)]emit warnings - Better exhaustive checking of ranges in match statements
1.79
- Inline
constexpressions likelet foo = [const { None }; 100]; - Temporary values have lifetime extended in if and match statements
1.78
- Diagnostic attributes for improving custom error messages
- Asserts for checks in unsafe methods enabled in debug mode
1.77
- C-string literals, e.g
c"abc"is nul-byte terminated string. - Recursion in
async fn - Enables stripping of debug info in release mode by default
1.76
- Added
any::type_name_of_valmethod to show string version of type name
1.75
async fnand-> impl Traitin traits described in more detail in separate post- Better code layout to reduce application size
1.74
- Lint configuration in Cargo manifest
- Authentication improvements for private Cargo registries
1.73
- Cleaner panic messages
- Tidier thread local init method
1.72
- Some clippy lints added as warnings
- Better error reports on
cfg-disabled items
1.71
- Debug viz attributes to improve GDB output etc
1.70
- Spare registry on by default
IsTerminal,OnceCellandOnceLockstabilized
1.69
- Debug info removed from build scripts
1.68
- Spare registry support stabilized, but not on by default
1.67
#[must_use]passes through async fn outputcrossbeam-channelmerged intostd::sync::mpsc
1.66
black_boxhint function for benchmarking- Explicit values for enums
- Inclusive ranges
..=4in match patterns
1.65
- Generics in associated types
let elsesyntax- break from labeled blocks
- split debuginfo on linux from binary
- backtrace API stabilized
1.64
IntoFuturetrait to simplify async APIs- More FFI types
rust-analyzeravailable via rustup- Cargo can inherit packages from workspaces, and build multiple archs at once
1.63
- Scoped threads
- Const sync primitives (mutex/rwlock/condvar)
- Removal of old lexical borrow checker
1.62.1
- Unsoundness fix with some
async fnandimpl Traitreturn types - Security fix for Intel SGX
1.62
cargo addcommand now built-in- Enums variants can now have
#[default] - Mutexes faster on Linux
total_cmpfor f32 and f64
1.61
fn maincan return custom exit codes via newTerminationtrait- Yet more
const fnthings std::io::stdout().lock()works without needing intermediate variable
1.60
- LLVM-based coverage stabilized
- Build timings stablized (
cargo build --timings) - New syntax for cargo features
- Incremental compilation re-enabled by default
1.59
- Incremental compilation disabled by default again
- Inline assembly
- Destructuring in assignments,
[c, .., d, _] = [1, 2, 3, 4, 5];etc - Stripping of (all) debug symbols stablized in Cargo
1.58.1
- Security fix for race condition with
std::fs::remove_dir_alland symlinks
1.58
- 2021 edition: Format strings can capture args from current scope, e.g
let a = "example"; let shorter = format!("{a}!"); -C stripargument to remove debug symbols from standard library
1.57
- Some tweaks to macros (
#derivecombined withcfg()and allows curly braces in expressions) - Custom named profiles in Cargo
- Failable
try_reservefor vec/string/hashmap/etc
1.56
- Rust 2021 edition
- Disjount capture, only necessary fields ad captured by closures
- New resolver, panic takes format string same as println
1.55
- Open for ranges,
match x { 0 => {}, 1..{} } - Cargo de-duplicates warnings when running tests
1.54
- Incremental complication is re-enabled (disabled in 1.52.1)
- Macros can be nested inside built-in macros
- SIMD support in WebAssembly
1.53
- Unicode idenfifiers
- "or patterns" inside matches, e.g
match ... { Some(1) | Some(2) => ... } - Cargo handles repos where default HEAD branch is not
master - Authors field no longer included by default
1.52
Including 1.52.1
- Disabled incremental compilation due to bug
1.51
const generics
1.50
- Lots of methods made
const
1.49
- Nothing too much - some stuff with unions and enums
1.48
- Rustdoc intra-doc links and
#[doc(alias = "...")]aliases