From 4c0c20e0c22d55ad058e583c78e499eb8d84665f Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Thu, 22 Jul 2021 15:20:54 -0400 Subject: [PATCH 01/10] Add initial draft of the post --- posts/2021-07-29-Rust-1.54.0.md | 74 +++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 posts/2021-07-29-Rust-1.54.0.md diff --git a/posts/2021-07-29-Rust-1.54.0.md b/posts/2021-07-29-Rust-1.54.0.md new file mode 100644 index 000000000..ca3a8e89a --- /dev/null +++ b/posts/2021-07-29-Rust-1.54.0.md @@ -0,0 +1,74 @@ +--- +layout: post +title: "Announcing Rust 1.54.0" +author: The Rust Release Team +release: true +--- + +# Announcing Rust 1.54.0 + +The Rust team is happy to announce a new version of Rust, 1.54.0. Rust is a programming language empowering everyone +to build reliable and efficient software. + +If you have a previous version of Rust installed via rustup, getting Rust +1.54.0 is as easy as: + +```console +rustup update stable +``` + +If you don't have it already, you can [get `rustup`][install] +from the appropriate page on our website, and check out the +[detailed release notes for 1.54.0][notes] on GitHub. + +[install]: https://www.rust-lang.org/install.html +[notes]: XXX + +## What's in 1.54.0 stable + +### Attributes can call macros!() + +Rust 1.54 supports invoking function-like macros inside attributes. One notable use case for this is including documentation from other files into Rust doc comments. For example, if your project's README represents a good documentation comment, you can use `include_str!` to directly incorporate the contents. Previously, various workarounds allowed similar functionality, but from 1.54 this is much more ergonomic. + + +```rust= +#![doc = include_str!("README.md")] +``` + +Macros can be nested inside the attribute as well, for example to include content generated by a build script: + +```rust +#[path = concat!(env!("OUT_DIR"), "/generated.rs")] +mod generated; +``` + +Read [here](https://github.com/rust-lang/rust/pull/83366) for more details. + +### wasm32 intrinsics stabilized + +A number of intrinsics for the wasm32 platform have been stabilized, which gives access to the SIMD instructions in WebAssembly. + +Notably, unlike the previously stabilized `x86` and `x86_64` intrinsics, these do not have a safety requirement to only be called when the appropriate target feature is enabled. This is because WebAssembly was written from the start to validate code safely before executing it, so instructions are guaranteed to be decoded correctly (or not at all). + +This means that we can expose some of the intrinsics as entirely safe functions, for example [`v128_bitselect`](https://doc.rust-lang.org/beta/core/arch/wasm32/fn.v128_bitselect.html). However, there are still some intrinsics which are unsafe, such as [`v128_load`](https://doc.rust-lang.org/beta/core/arch/wasm32/fn.v128_load.html). + +### Incremental Compilation is XXX by default + +TODO - Wesley is going to draft text here. + +### Stabilized APIs + +The following methods and trait implementations were stabilized. + +TODO + +### Other changes + +There are other changes in the Rust 1.54.0 release: +check out what changed in [Rust](XXX), [Cargo](XXX), and [Clippy](XXX). + +### Contributors to 1.54.0 + +Many people came together to create Rust 1.54.0. +We couldn't have done it without all of you. +[Thanks!](https://thanks.rust-lang.org/rust/1.54.0/) From 85bb9f8f4fc333b4dbc0f8c1b0908b8ccdf97e82 Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Thu, 22 Jul 2021 16:33:34 -0400 Subject: [PATCH 02/10] Update posts/2021-07-29-Rust-1.54.0.md Co-authored-by: Josh Triplett --- posts/2021-07-29-Rust-1.54.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/posts/2021-07-29-Rust-1.54.0.md b/posts/2021-07-29-Rust-1.54.0.md index ca3a8e89a..fff201b6a 100644 --- a/posts/2021-07-29-Rust-1.54.0.md +++ b/posts/2021-07-29-Rust-1.54.0.md @@ -50,7 +50,7 @@ A number of intrinsics for the wasm32 platform have been stabilized, which gives Notably, unlike the previously stabilized `x86` and `x86_64` intrinsics, these do not have a safety requirement to only be called when the appropriate target feature is enabled. This is because WebAssembly was written from the start to validate code safely before executing it, so instructions are guaranteed to be decoded correctly (or not at all). -This means that we can expose some of the intrinsics as entirely safe functions, for example [`v128_bitselect`](https://doc.rust-lang.org/beta/core/arch/wasm32/fn.v128_bitselect.html). However, there are still some intrinsics which are unsafe, such as [`v128_load`](https://doc.rust-lang.org/beta/core/arch/wasm32/fn.v128_load.html). +This means that we can expose some of the intrinsics as entirely safe functions, for example [`v128_bitselect`](https://doc.rust-lang.org/beta/core/arch/wasm32/fn.v128_bitselect.html). However, there are still some intrinsics which are unsafe because they use raw pointers, such as [`v128_load`](https://doc.rust-lang.org/beta/core/arch/wasm32/fn.v128_load.html). ### Incremental Compilation is XXX by default From a0e61b8a3acc3bdcabffbc91818b0dcaf5205c5d Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Thu, 22 Jul 2021 18:06:37 -0400 Subject: [PATCH 03/10] Add note about rustfmt fix --- posts/2021-07-29-Rust-1.54.0.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/posts/2021-07-29-Rust-1.54.0.md b/posts/2021-07-29-Rust-1.54.0.md index fff201b6a..f23186885 100644 --- a/posts/2021-07-29-Rust-1.54.0.md +++ b/posts/2021-07-29-Rust-1.54.0.md @@ -67,6 +67,10 @@ TODO There are other changes in the Rust 1.54.0 release: check out what changed in [Rust](XXX), [Cargo](XXX), and [Clippy](XXX). +rustfmt has also been fixed in the 1.54.0 release to properly format nested +out-of-line modules. This may cause changes in formatting to files that were +being ignored by the 1.53.0 rustfmt. See details [here](https://github.com/rust-lang/rust/pull/86424). + ### Contributors to 1.54.0 Many people came together to create Rust 1.54.0. From 1ff8ed2534d499703b2574a6b43a9cfef423e884 Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Tue, 27 Jul 2021 12:49:30 -0400 Subject: [PATCH 04/10] Update posts/2021-07-29-Rust-1.54.0.md Co-authored-by: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com> --- posts/2021-07-29-Rust-1.54.0.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/posts/2021-07-29-Rust-1.54.0.md b/posts/2021-07-29-Rust-1.54.0.md index f23186885..edc059fd8 100644 --- a/posts/2021-07-29-Rust-1.54.0.md +++ b/posts/2021-07-29-Rust-1.54.0.md @@ -60,7 +60,25 @@ TODO - Wesley is going to draft text here. The following methods and trait implementations were stabilized. -TODO +- [`BTreeMap::into_keys`] +- [`BTreeMap::into_values`] +- [`HashMap::into_keys`] +- [`HashMap::into_values`] +- [`arch::wasm32`] +- [`VecDeque::binary_search`] +- [`VecDeque::binary_search_by`] +- [`VecDeque::binary_search_by_key`] +- [`VecDeque::partition_point`] + +[`BTreeMap::into_keys`]: https://doc.rust-lang.org/std/collections/struct.BTreeMap.html#method.into_keys +[`BTreeMap::into_values`]: https://doc.rust-lang.org/std/collections/struct.BTreeMap.html#method.into_values +[`HashMap::into_keys`]: https://doc.rust-lang.org/std/collections/struct.HashMap.html#method.into_keys +[`HashMap::into_values`]: https://doc.rust-lang.org/std/collections/struct.HashMap.html#method.into_values +[`arch::wasm32`]: https://doc.rust-lang.org/core/arch/wasm32/index.html +[`VecDeque::binary_search`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.binary_search +[`VecDeque::binary_search_by`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.binary_search_by +[`VecDeque::binary_search_by_key`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.binary_search_by_key +[`VecDeque::partition_point`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.partition_point ### Other changes From f465926b7809ce28a3af000cb6ed2ad355e6b09c Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Tue, 27 Jul 2021 12:49:35 -0400 Subject: [PATCH 05/10] Update posts/2021-07-29-Rust-1.54.0.md Co-authored-by: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com> --- posts/2021-07-29-Rust-1.54.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/posts/2021-07-29-Rust-1.54.0.md b/posts/2021-07-29-Rust-1.54.0.md index edc059fd8..09c1bd389 100644 --- a/posts/2021-07-29-Rust-1.54.0.md +++ b/posts/2021-07-29-Rust-1.54.0.md @@ -83,7 +83,7 @@ The following methods and trait implementations were stabilized. ### Other changes There are other changes in the Rust 1.54.0 release: -check out what changed in [Rust](XXX), [Cargo](XXX), and [Clippy](XXX). +check out what changed in [Rust](https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1540-2021-07-29), [Cargo](https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-154-2021-07-29), and [Clippy](https://github.com/rust-lang/rust-clippy/blob/master/CHANGELOG.md#rust-154). rustfmt has also been fixed in the 1.54.0 release to properly format nested out-of-line modules. This may cause changes in formatting to files that were From ebacba6191517a2b53d8d5da9e9bebc60467cad0 Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Tue, 27 Jul 2021 12:49:41 -0400 Subject: [PATCH 06/10] Update posts/2021-07-29-Rust-1.54.0.md Co-authored-by: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com> --- posts/2021-07-29-Rust-1.54.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/posts/2021-07-29-Rust-1.54.0.md b/posts/2021-07-29-Rust-1.54.0.md index 09c1bd389..a771a1f92 100644 --- a/posts/2021-07-29-Rust-1.54.0.md +++ b/posts/2021-07-29-Rust-1.54.0.md @@ -22,7 +22,7 @@ from the appropriate page on our website, and check out the [detailed release notes for 1.54.0][notes] on GitHub. [install]: https://www.rust-lang.org/install.html -[notes]: XXX +[notes]: https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1540-2021-07-29 ## What's in 1.54.0 stable From f7921da904122a9dfc1d7d706d3ae637d8eb9098 Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Tue, 27 Jul 2021 12:50:26 -0400 Subject: [PATCH 07/10] Update posts/2021-07-29-Rust-1.54.0.md Co-authored-by: Esteban Kuber --- posts/2021-07-29-Rust-1.54.0.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/posts/2021-07-29-Rust-1.54.0.md b/posts/2021-07-29-Rust-1.54.0.md index a771a1f92..8f777bdb6 100644 --- a/posts/2021-07-29-Rust-1.54.0.md +++ b/posts/2021-07-29-Rust-1.54.0.md @@ -52,10 +52,26 @@ Notably, unlike the previously stabilized `x86` and `x86_64` intrinsics, these d This means that we can expose some of the intrinsics as entirely safe functions, for example [`v128_bitselect`](https://doc.rust-lang.org/beta/core/arch/wasm32/fn.v128_bitselect.html). However, there are still some intrinsics which are unsafe because they use raw pointers, such as [`v128_load`](https://doc.rust-lang.org/beta/core/arch/wasm32/fn.v128_load.html). -### Incremental Compilation is XXX by default +### Incremental Compilation is re-enabled by default -TODO - Wesley is going to draft text here. +Incremental compilation has been re-enabled by default in this release, after it being disabled by default in 1.52. +In Rust 1.52, additional validation was added when loading incremental compilation data from the on-disk cache. +This resulted in a number of pre-existing potential soundness issues being uncovered as the validation changed these silent bugs into internal compiler errors (ICEs). +In response, the Compiler Team decided to disable incremental compilation in the 1.52.1 patch, allowing users to avoid encountering the ICEs and the underlying unsoundness, at the expense of longer compile times. [^1] + +Since then, we've conducted a [series of retrospectives][retros] and contributors have been hard at work resolving the reported issues, with some fixes landing in 1.53 and the majority landing in this release. [^2] + +There are currently still two known issues which can result in an ICE. +Due to the lack of automated crash reporting, we can't be certain of the full extent of impact of the outstanding issues. However, based on the feedback we received from users affected by the 1.52 release, we believe these issues to be rare. + +Therefore, incremental compilation has been re-enabled in this release! + +[^1]: The [1.52.1 release notes] contain a more detailed description of these events. +[^2]: The tracking issue for the issues is [#84970]. +[#84970]: https://github.com/rust-lang/rust/issues/84970 +[1.52.1 release notes]: https://blog.rust-lang.org/2021/05/10/Rust-1.52.1.html +[retros]: https://github.com/rust-lang/compiler-team/issues/435 ### Stabilized APIs The following methods and trait implementations were stabilized. From dcd2eec314ca641b6258f039c51f81131c515e5c Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Tue, 27 Jul 2021 12:51:14 -0400 Subject: [PATCH 08/10] Update 2021-07-29-Rust-1.54.0.md --- posts/2021-07-29-Rust-1.54.0.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/posts/2021-07-29-Rust-1.54.0.md b/posts/2021-07-29-Rust-1.54.0.md index 8f777bdb6..3acab59df 100644 --- a/posts/2021-07-29-Rust-1.54.0.md +++ b/posts/2021-07-29-Rust-1.54.0.md @@ -54,7 +54,7 @@ This means that we can expose some of the intrinsics as entirely safe functions, ### Incremental Compilation is re-enabled by default -Incremental compilation has been re-enabled by default in this release, after it being disabled by default in 1.52. +Incremental compilation has been re-enabled by default in this release, after it being disabled by default in 1.52.1. In Rust 1.52, additional validation was added when loading incremental compilation data from the on-disk cache. This resulted in a number of pre-existing potential soundness issues being uncovered as the validation changed these silent bugs into internal compiler errors (ICEs). @@ -63,7 +63,7 @@ In response, the Compiler Team decided to disable incremental compilation in the Since then, we've conducted a [series of retrospectives][retros] and contributors have been hard at work resolving the reported issues, with some fixes landing in 1.53 and the majority landing in this release. [^2] There are currently still two known issues which can result in an ICE. -Due to the lack of automated crash reporting, we can't be certain of the full extent of impact of the outstanding issues. However, based on the feedback we received from users affected by the 1.52 release, we believe these issues to be rare. +Due to the lack of automated crash reporting, we can't be certain of the full extent of impact of the outstanding issues. However, based on the feedback we received from users affected by the 1.52 release, we believe the remaining issues to be rare in practice. Therefore, incremental compilation has been re-enabled in this release! @@ -72,6 +72,7 @@ Therefore, incremental compilation has been re-enabled in this release! [#84970]: https://github.com/rust-lang/rust/issues/84970 [1.52.1 release notes]: https://blog.rust-lang.org/2021/05/10/Rust-1.52.1.html [retros]: https://github.com/rust-lang/compiler-team/issues/435 + ### Stabilized APIs The following methods and trait implementations were stabilized. From e118f9995d571b4a30d14c0b2369bddd6aa0a26c Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Wed, 28 Jul 2021 23:22:23 +0200 Subject: [PATCH 09/10] fix markdown --- posts/2021-07-29-Rust-1.54.0.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/posts/2021-07-29-Rust-1.54.0.md b/posts/2021-07-29-Rust-1.54.0.md index 3acab59df..954e58947 100644 --- a/posts/2021-07-29-Rust-1.54.0.md +++ b/posts/2021-07-29-Rust-1.54.0.md @@ -5,8 +5,6 @@ author: The Rust Release Team release: true --- -# Announcing Rust 1.54.0 - The Rust team is happy to announce a new version of Rust, 1.54.0. Rust is a programming language empowering everyone to build reliable and efficient software. @@ -69,6 +67,7 @@ Therefore, incremental compilation has been re-enabled in this release! [^1]: The [1.52.1 release notes] contain a more detailed description of these events. [^2]: The tracking issue for the issues is [#84970]. + [#84970]: https://github.com/rust-lang/rust/issues/84970 [1.52.1 release notes]: https://blog.rust-lang.org/2021/05/10/Rust-1.52.1.html [retros]: https://github.com/rust-lang/compiler-team/issues/435 From 69d041678d1a05a07eb2bd737fd5b13eb3c887fb Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Thu, 29 Jul 2021 09:20:06 -0400 Subject: [PATCH 10/10] Adjust macro section --- posts/2021-07-29-Rust-1.54.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/posts/2021-07-29-Rust-1.54.0.md b/posts/2021-07-29-Rust-1.54.0.md index 954e58947..aae548ea8 100644 --- a/posts/2021-07-29-Rust-1.54.0.md +++ b/posts/2021-07-29-Rust-1.54.0.md @@ -24,9 +24,9 @@ from the appropriate page on our website, and check out the ## What's in 1.54.0 stable -### Attributes can call macros!() +### Attributes can invoke function-like macros -Rust 1.54 supports invoking function-like macros inside attributes. One notable use case for this is including documentation from other files into Rust doc comments. For example, if your project's README represents a good documentation comment, you can use `include_str!` to directly incorporate the contents. Previously, various workarounds allowed similar functionality, but from 1.54 this is much more ergonomic. +Rust 1.54 supports invoking function-like macros inside attributes. Function-like macros can be either `macro_rules!` based or procedural macros which are invoked like `macro!(...)`. One notable use case for this is including documentation from other files into Rust doc comments. For example, if your project's README represents a good documentation comment, you can use `include_str!` to directly incorporate the contents. Previously, various workarounds allowed similar functionality, but from 1.54 this is much more ergonomic. ```rust=