Series: The Rust Annals

Vol. I Issue 24 nlopes.dev

Announcing Rust 1.23

Routine 8-week stable release. Focuses on standard library ergonomics and minor Cargo convenience features, without introducing significant language changes or ecosystem milestones.

Library stabilizations

As of Rust 1.0, a trait named AsciiExt existed to provide ASCII related functionality on u8, char, [u8], and str. To use it, you’d write code like this:

use std::ascii::AsciiExt;

let ascii = 'a';
let non_ascii = '❤';
let int_ascii = 97;

assert!(ascii.is_ascii());
assert!(!non_ascii.is_ascii());
assert!(int_ascii.is_ascii());

In Rust 1.23, these methods are now defined directly on those types, and so you no longer need to import the trait. Thanks to our stability guarantees, this trait still exists, so if you’d like to still support Rust versions before Rust 1.23, you can do this:

#[allow(unused_imports)]
use std::ascii::AsciiExt;

…to suppress the related warning. Once you drop support for older Rusts, you can remove both lines, and everything will continue to work.

Additionally, a few new APIs were stabilized this release:

See the detailed release notes for more.

Cargo features

cargo check can now check your unit tests.

cargo uninstall can now uninstall more than one package in one command.

See the detailed release notes for more.

Reproduced from the Rust blog under its publication licence. Typeset in Literata.