📜 ⬆️ ⬇️

Release Rust 1.23

The Rust team is pleased to announce the new version of Rust: 1.23.0. Rust is a system programming language aimed at security, speed, and parallel code execution.


If you have a previous version of Rust installed, just update it with:


$ rustup update stable 

If you have not yet installed rustup , you can install it from the corresponding page of our website. Detailed notes for the release of Rust 1.23.0 can be found on GitHub.


What is included in the stable version 1.23.0


New year, new Rust! Our first improvement is getting rid of redundant copies in some situations. With these changes, rustc memory rustc decreased by 5-10%, but the results for your applications may differ.


The documentation team has come a long way for rustdoc use CommonMark . Prior to that, rustdoc did not guarantee which markdown rendering engine it used. As part of this release, we still visualize the documentation of our past engine - Hoedown - but in parallel, we also visualize the CommonMark-compatible engine, issuing warnings for various results. We have not yet encountered a situation where it would be impossible to change the syntax of the document so that it satisfies both engines at once. A member of the documentation team Guillaume Gomez wrote a note about this in his journal , which shows some frequently occurring engine differences and ways to circumvent them. In a future release of CommonMark, the engine will be used by default. The warning appeared in the night version in May last year and was enabled by default since October last year , so many packages (crates) have already fixed the problems encountered.


A little more about documentation: historically, the Cargo documentation was a bit strange. Instead of being located on doc.rust-lang.org , it was located on doc.crates.io . With this release, this will change : you can now find the Cargo documentation at doc.rust-lang.org/cargo . We will add a redirect from doc.crates.io to this page. In addition, the documentation has been converted to our "book" format.


See the release notes for details.


Standard Library Stabilization


Starting with Rust 1.0, there is a type (trait) AsciiExt , which provides ASCII related functionality for u8 , char , [u8] and str . To use it, you had to write similar code:


 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 declared directly for types, so you no longer need to import a type. Thanks to our guarantees of stability, this type still exists, so if you want to support versions of Rust below 1.23, you can write:


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

... to suppress the corresponding warning. When you refuse to support old versions of Rust, both lines can be deleted and everything will continue to work.


Also, several APIs have been stabilized:



See the release notes for details.


Cargo features


cargo check can now test your unit tests .


cargo uninstall can now remove more than one package with one command .


See the release notes for details.


Developers 1.23.0


A lot of people participated in the development of Rust 1.23. We could not achieve this without the participation of each of you. Thank!


Authors translation: @ BORN2LOSE and ozkriff .


')

Source: https://habr.com/ru/post/346106/


All Articles