Skip to content

Rust 1.14.0

Choose a tag to compare

@rustbot rustbot released this 10 Sep 08:07
· 292378 commits to main since this release

Language

  • [.. matches multiple tuple fields in enum variants, structs and tuples][36843]. [RFC 1492].
  • [Safe fn items can be coerced to unsafe fn pointers][37389]
  • [use * and use ::* both glob-import from the crate root][37367]
  • [It's now possible to call a Vec<Box<Fn()>> without explicit dereferencing][36822]

Compiler

  • [Mark enums with non-zero discriminant as non-zero][37224]
  • [Lower-case static mut names are linted like other statics and consts][37162]
  • [Fix ICE on some macros in const integer positions (e.g. [u8; m!()])][36819]
  • [Improve error message and snippet for "did you mean x"][36798]
  • [Add a panic-strategy field to the target specification][36794]
  • [Include LLVM version in --version --verbose][37200]

Compile-time Optimizations

  • [Improve macro expansion performance][37569]
  • [Shrink Expr_::ExprInlineAsm][37445]
  • [Replace all uses of SHA-256 with BLAKE2b][37439]
  • [Reduce the number of bytes hashed by IchHasher][37427]
  • [Avoid more allocations when compiling html5ever][37373]
  • [Use SmallVector in CombineFields::instantiate][37322]
  • [Avoid some allocations in the macro parser][37318]
  • [Use a faster deflate setting][37298]
  • [Add ArrayVec and AccumulateVec to reduce heap allocations during interning of slices][37270]
  • [Optimize write_metadata][37267]
  • [Don't process obligation forest cycles when stalled][37231]
  • [Avoid many CrateConfig clones][37161]
  • [Optimize Substs::super_fold_with][37108]
  • [Optimize ObligationForest's NodeState handling][36993]
  • [Speed up plug_leaks][36917]

Libraries

  • [println!(), with no arguments, prints newline][36825]. Previously, an empty string was required to achieve the same.
  • [Wrapping impls standard binary and unary operators, as well as the Sum and Product iterators][37356]
  • [Implement From<Cow<str>> for String and From<Cow<[T]>> for Vec<T>][37326]
  • [Improve fold performance for chain, cloned, map, and VecDeque iterators][37315]
  • [Improve SipHasher performance on small values][37312]
  • [Add Iterator trait TrustedLen to enable better FromIterator / Extend][37306]
  • [Expand .zip() specialization to .map() and .cloned()][37230]
  • [ReadDir implements Debug][37221]
  • [Implement RefUnwindSafe for atomic types][37178]
  • [Specialize Vec::extend to Vec::extend_from_slice][37094]
  • [Avoid allocations in Decoder::read_str][37064]
  • [io::Error implements From<io::ErrorKind>][37037]
  • [Impl Debug for raw pointers to unsized data][36880]
  • [Don't reuse HashMap random seeds][37470]
  • [The internal memory layout of HashMap is more cache-friendly, for significant improvements in some operations][36692]
  • [HashMap uses less memory on 32-bit architectures][36595]
  • [Impl Add<{str, Cow<str>}> for Cow<str>][36430]

Cargo

  • [Expose rustc cfg values to build scripts][cargo/3243]
  • [Allow cargo to work with read-only CARGO_HOME][cargo/3259]
  • [Fix passing --features when testing multiple packages][cargo/3280]
  • [Use a single profile set per workspace][cargo/3249]
  • [Load replace sections from lock files][cargo/3220]
  • [Ignore panic configuration for test/bench profiles][cargo/3175]

Tooling

  • [rustup is the recommended Rust installation method][1.14rustup]
  • This release includes host (rustc) builds for Linux on MIPS, PowerPC, and S390x. These are [tier 2] platforms and may have major defects. Follow the instructions on the website to install, or add the targets to an existing installation with rustup target add. The new target triples are:
    • mips-unknown-linux-gnu
    • mipsel-unknown-linux-gnu
    • mips64-unknown-linux-gnuabi64
    • mips64el-unknown-linux-gnuabi64
    • powerpc-unknown-linux-gnu
    • powerpc64-unknown-linux-gnu
    • powerpc64le-unknown-linux-gnu
    • s390x-unknown-linux-gnu
  • This release includes target (std) builds for ARM Linux running MUSL libc. These are [tier 2] platforms and may have major defects. Add the following triples to an existing rustup installation with rustup target add:
    • arm-unknown-linux-musleabi
    • arm-unknown-linux-musleabihf
    • armv7-unknown-linux-musleabihf
  • This release includes [experimental support for WebAssembly][1.14wasm], via the wasm32-unknown-emscripten target. This target is known to have major defects. Please test, report, and fix.
  • rustup no longer installs documentation by default. Run rustup component add rust-docs to install.
  • [Fix line stepping in debugger][37310]
  • [Enable line number debuginfo in releases][37280]

Misc

  • [Disable jemalloc on aarch64/powerpc/mips][37392]
  • [Add support for Fuchsia OS][37313]
  • [Detect local-rebuild by only MAJOR.MINOR version][37273]

Compatibility Notes

  • [A number of forward-compatibility lints used by the compiler to gradually introduce language changes have been converted to deny by default][36894]:
    • ["use of inaccessible extern crate erroneously allowed"][36886]
    • ["type parameter default erroneously allowed in invalid location"][36887]
    • ["detects super or self keywords at the beginning of global path"][36888]
    • ["two overlapping inherent impls define an item with the same name were erroneously allowed"][36889]
    • ["floating-point constants cannot be used in patterns"][36890]
    • ["constants of struct or enum type can only be used in a pattern if the struct or enum has #[derive(PartialEq, Eq)]"][36891]
    • ["lifetimes or labels named '_ were erroneously allowed"][36892]
  • [Prohibit patterns in trait methods without bodies][37378]
  • [The atomic Ordering enum may not be matched exhaustively][37351]
  • [Future-proofing #[no_link] breaks some obscure cases][37247]
  • [The $crate macro variable is accepted in fewer locations][37213]
  • [Impls specifying extra region requirements beyond the trait they implement are rejected][37167]
  • [Enums may not be unsized][37111]. Unsized enums are intended to work but never have. For now they are forbidden.
  • [Enforce the shadowing restrictions from RFC 1560 for today's macros][36767]