Email me

Rust versions / 1.15

Rust release · Feb 2, 2017

Rust 1.15: what's new, what was stabilized

Short answerRust 1.15 was released on Feb 2, 2017: 17 newly stable APIs (std::iter::Iterator::min_by, std::iter::Iterator::max_by, std::os::*::fs::FileExt, std::sync::atomic::Atomic*::get_mut, ...); 6 compatibility notes that can affect existing code. Point release: 1.15.1 (Feb 9, 2017).

Feb 2, 2017release date
0language stabilizations
17APIs stabilized
-new edition

← Rust 1.14All versionsRust 1.16 →

17 APIs stabilized

std::iter::Iterator::min_by, std::iter::Iterator::max_by, std::os::*::fs::FileExt, std::sync::atomic::Atomic*::get_mut, std::sync::atomic::Atomic*::into_inner, std::vec::IntoIter::as_slice, std::vec::IntoIter::as_mut_slice, std::sync::mpsc::Receiver::try_iter, std::os::unix::process::CommandExt::before_exec, std::rc::Rc::strong_count, std::rc::Rc::weak_count, std::sync::Arc::strong_count, std::sync::Arc::weak_count, std::char::encode_utf8, std::char::encode_utf16, std::cell::Ref::clone, std::io::Take::into_inner

Can it break my build?

The release lists these compatibility notes. Most only affect rare code, but read them before you raise your toolchain in CI:

  • [A number of minor changes to name resolution have been activated][37127].
  • [In this release, Cargo build scripts no longer have access to the OUT_DIR
  • [Higher-ranked lifetimes are no longer allowed to appear _only_ in associated
  • [The semantics relating modules to file system directories are changing in
  • [Rust-ABI symbols are no longer exported from cdylibs][38117]
  • [Once Peekable peeks a None it will return that None without re-querying

Use it

rustup update stable        # get the newest release
rustup install 1.15          # or exactly this one
rustup override set 1.15     # pin a project to it

To require at least this version from users of your crate, set rust-version = "1.15" under [package] in Cargo.toml. Cargo then refuses to build it on older compilers with a clear message, and with resolver 3 (the default on the 2024 edition, Rust 1.85+) it also prefers dependency versions that support it.

Full release notes

Language

  • Basic procedural macros allowing custom #[derive], aka "macros 1.1", are stable. This allows popular code-generating crates like Serde and Diesel to work ergonomically. [RFC 1681].
  • [Tuple structs may be empty. Unary and empty tuple structs may be instantiated with curly braces][36868]. Part of [RFC 1506].
  • [A number of minor changes to name resolution have been activated][37127]. They add up to more consistent semantics, allowing for future evolution of Rust macros. Specified in [RFC 1560], see its section on ["changes"] for details of what is different. The breaking changes here have been transitioned through the [legacy_imports] lint since 1.14, with no known regressions.
  • [In macro_rules, path fragments can now be parsed as type parameter bounds][38279]
  • [?Sized can be used in where clauses][37791]
  • [There is now a limit on the size of monomorphized types and it can be modified with the #![type_size_limit] crate attribute, similarly to the #![recursion_limit] attribute][37789]

Compiler

  • [On Windows, the compiler will apply dllimport attributes when linking to extern functions][37973]. Additional attributes and flags can control which library kind is linked and its name. [RFC 1717].
  • [Rust-ABI symbols are no longer exported from cdylibs][38117]
  • [The --test flag works with procedural macro crates][38107]
  • [Fix extern "aapcs" fn ABI][37814]
  • [The -C no-stack-check flag is deprecated][37636]. It does nothing.
  • [The format! expander recognizes incorrect printf and shell-style formatting directives and suggests the correct format][37613].
  • [Only report one error for all unused imports in an import list][37456]

Compiler Performance

  • [Avoid unnecessary mk_ty calls in Ty::super_fold_with][37705]
  • [Avoid more unnecessary mk_ty calls in Ty::super_fold_with][37979]
  • [Don't clone in UnificationTable::probe][37848]
  • [Remove scope_auxiliary to cut RSS by 10%][37764]
  • [Use small vectors in type walker][37760]
  • [Macro expansion performance was improved][37701]
  • [Change HirVec<P<T>> to HirVec<T> in hir::Expr][37642]
  • [Replace FNV with a faster hash function][37229]

Stabilized APIs

  • [std::iter::Iterator::min_by]
  • [std::iter::Iterator::max_by]
  • [std::os::*::fs::FileExt]
  • [std::sync::atomic::Atomic*::get_mut]
  • [std::sync::atomic::Atomic*::into_inner]
  • [std::vec::IntoIter::as_slice]
  • [std::vec::IntoIter::as_mut_slice]
  • [std::sync::mpsc::Receiver::try_iter]
  • [std::os::unix::process::CommandExt::before_exec]
  • [std::rc::Rc::strong_count]
  • [std::rc::Rc::weak_count]
  • [std::sync::Arc::strong_count]
  • [std::sync::Arc::weak_count]
  • [std::char::encode_utf8]
  • [std::char::encode_utf16]
  • [std::cell::Ref::clone]
  • [std::io::Take::into_inner]

Libraries

  • [The standard sorting algorithm has been rewritten for dramatic performance improvements][38192]. It is a hybrid merge sort, drawing influences from Timsort. Previously it was a naive merge sort.
  • [Iterator::nth no longer has a Sized bound][38134]
  • [Extend<&T> is specialized for Vec where T: Copy][38182] to improve performance.
  • [chars().count() is much faster][37888] and so are [chars().last() and char_indices().last()][37882]
  • [Fix ARM Objective-C ABI in std::env::args][38146]
  • [Chinese characters display correctly in fmt::Debug][37855]
  • [Derive Default for Duration][37699]
  • [Support creation of anonymous pipes on WinXP/2k][37677]
  • [mpsc::RecvTimeoutError implements Error][37527]
  • [Don't pass overlapped handles to processes][38835]

Cargo

  • [In this release, Cargo build scripts no longer have access to the OUT_DIR environment variable at build time via env!("OUT_DIR")][cargo/3368]. They should instead check the variable at runtime with std::env. That the value was set at build time was a bug, and incorrect when cross-compiling. This change is known to cause breakage.
  • [Add --all flag to cargo test][cargo/3221]
  • [Compile statically against the MSVC CRT][cargo/3363]
  • [Mix feature flags into fingerprint/metadata shorthash][cargo/3102]
  • [Link OpenSSL statically on OSX][cargo/3311]
  • [Apply new fingerprinting to build dir outputs][cargo/3310]
  • [Test for bad path overrides with summaries][cargo/3336]
  • [Require cargo install --vers to take a semver version][cargo/3338]
  • [Fix retrying crate downloads for network errors][cargo/3348]
  • [Implement string lookup for build.rustflags config key][cargo/3356]
  • [Emit more info on --message-format=json][cargo/3319]
  • [Assume build.rs in the same directory as Cargo.toml is a build script][cargo/3361]
  • [Don't ignore errors in workspace manifest][cargo/3409]
  • [Fix --message-format JSON when rustc emits non-JSON warnings][cargo/3410]

Tooling

  • [Test runners (binaries built with --test) now support a --list argument that lists the tests it contains][38185]
  • [Test runners now support a --exact argument that makes the test filter match exactly, instead of matching only a substring of the test name][38181]
  • [rustdoc supports a --playground-url flag][37763]
  • [rustdoc provides more details about #[should_panic] errors][37749]

Misc

  • [The Rust build system is now written in Rust][37817]. The Makefiles may continue to be used in this release by passing --disable-rustbuild to the configure script, but they will be deleted soon. Note that the new build system uses a different on-disk layout that will likely affect any scripts building Rust.
  • [Rust supports i686-unknown-openbsd][38086]. Tier 3 support. No testing or releases.
  • [Rust supports the MSP430][37627]. Tier 3 support. No testing or releases.
  • [Rust supports the ARMv5TE architecture][37615]. Tier 3 support. No testing or releases.

Compatibility Notes

1.15.1 (Feb 9, 2017)

Release notes from the Rust project's RELEASES.md (MIT or Apache-2.0); summaries above are ours.

← Rust 1.14All versionsRust 1.16 →

Up next

Next releaseRust 1.16Released Mar 16, 2017.Read it next →

Did this answer your question?

Get the receipts by email.

What my AI agents tried this week, with the real numbers: what worked, what flopped, what made money. One email when there is something worth reading.

No spam, never sold. Every email has a one-click unsubscribe.

Popular in the shop

All 124 tools →

Browse: Bundles and kitsHome, family and schoolMoney and businessAI toolsSports and fitnessMaking and hobbiesFood and drinkIndie dev and launchTrading and quant

Free: Landing page teardown iPhone app cost calculator LLM API cost calculator Paid online: $49 Launch Check App builds Articles FAQ