From 5498b9af907b3ab0ea8d144d4e2c0b7d41b8920b Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Mon, 28 Dec 2020 13:56:09 -0600 Subject: [PATCH 1/8] Release notes for Rust 1.49.0 --- posts/2020-12-31-Rust-1.49.0.md | 169 ++++++++++++++++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 posts/2020-12-31-Rust-1.49.0.md diff --git a/posts/2020-12-31-Rust-1.49.0.md b/posts/2020-12-31-Rust-1.49.0.md new file mode 100644 index 000000000..31bd28204 --- /dev/null +++ b/posts/2020-12-31-Rust-1.49.0.md @@ -0,0 +1,169 @@ +--- +layout: post +title: "Announcing Rust 1.40.0" +author: The Rust Release Team +release: true +--- + +The Rust team is happy to announce a new version of Rust, 1.49.0. Rust is a +programming language that is empowering everyone to build reliable and +efficient software. + +If you have a previous version of Rust installed via rustup, getting Rust +1.49.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.49.0][notes] on GitHub. + +[install]: https://www.rust-lang.org/install.html +[notes]: https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1490-2020-12-31 + +## What's in 1.49.0 stable + +For this release, we have some new targets and an improvement to the test +framework. See the [detailed release notes][notes] to learn about other +changes not covered by this post. + +### aarch64 targets + +We have two big changes to three targets: + +* [`aarch64-unknown-linux-gnu` is now Tier 1](https://github.com/rust-lang/rust/pull/78228) +* [`aarch64-apple-darwin` is now Tier 2](https://github.com/rust-lang/rust/pull/75991) +* [`aarch64-pc-windows-msvc` is now Tier 2](https://github.com/rust-lang/rust/pull/75914) + +If you're not familiar with our "tiers" of support, you can read about that +on our [platform support +page](https://doc.rust-lang.org/stable/rustc/platform-support.html). In +brief, Tier 1 is "guaranteed to work," Tier 2 is "guaranteed to build," and +Tier 3 is "code exists but is not tested." If you're a 64-bit ARM user, these +changes mean that Rust programs will work better on your platforms! + +### Test framework captures output in threads + +Rust's built-in testing framework doesn't have a ton of features, but that +doesn't mean it can't be improved! Consider a test that looks like this: + +```rust +#[test] +fn thready_pass() { + println!("fee"); + std::thread::spawn(|| { + println!("fie"); + println!("foe"); + }) + .join() + .unwrap(); + println!("fum"); +} +``` + +Here's what running this test looks like before Rust 1.49.0: + +```text +❯ cargo test + Compiling threadtest v0.1.0 (C:\threadtest) + Finished test [unoptimized + debuginfo] target(s) in 0.38s + Running target\debug\deps\threadtest-02f42ffd9836cae5.exe + +running 1 test +fie +foe +test thready_pass ... ok + +test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out + + Doc-tests threadtest + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out +``` + +You can see that the output from the thread is printed, which intermixes +from the output of the test framework itself. Wouldn't it be nice +if every `println!` worked like that one that prints "`fum`?" Well, [that's +the behavior in Rust 1.49.0](https://github.com/rust-lang/rust/pull/78227): + +```text +❯ cargo +nightly test + Compiling threadtest v0.1.0 (C:\threadtest) + Finished test [unoptimized + debuginfo] target(s) in 0.52s + Running target\debug\deps\threadtest-40aabfaa345584be.exe + +running 1 test +test thready_pass ... ok + +test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + Doc-tests threadtest + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s +``` + +But don't worry; if the test were to fail, you'll still see all of the +output. By adding a `panic!` to the end of the test, we can see what failure +looks like: + +```text +❯ cargo +nightly test + Compiling threadtest v0.1.0 (C:\threadtest) + Finished test [unoptimized + debuginfo] target(s) in 0.52s + Running target\debug\deps\threadtest-40aabfaa345584be.exe + +running 1 test +test thready_pass ... FAILED + +failures: + +---- thready_pass stdout ---- +fee +fie +foe +fum +thread 'thready_pass' panicked at 'explicit panic', src\lib.rs:11:5 +``` + +Specifically, the test runner makes sure to capture the output, and saves it +in case the test fails. + +### Library changes + +In Rust 1.49.0, there are three new stable functions: + +- [`slice::select_nth_unstable`] +- [`slice::select_nth_unstable_by`] +- [`slice::select_nth_unstable_by_key`] + +And two functions were made `const`: + +- [`Poll::is_ready`] +- [`Poll::is_pending`] + +See the [detailed release notes][notes] to learn about other changes. + +[`slice::select_nth_unstable`]: https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.select_nth_unstable +[`slice::select_nth_unstable_by`]: https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.select_nth_unstable_by +[`slice::select_nth_unstable_by_key`]: https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.select_nth_unstable_by_key +[`Poll::is_ready`]: https://doc.rust-lang.org/stable/std/task/enum.Poll.html#method.is_ready +[`Poll::is_pending`]: https://doc.rust-lang.org/stable/std/task/enum.Poll.html#method.is_pending + +### Other changes + +[relnotes-cargo]: https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-149-2020-12-31 +[relnotes-clippy]: https://github.com/rust-lang/rust-clippy/blob/master/CHANGELOG.md#rust-149 + +There are other changes in the Rust 1.49.0 release: check out what changed in +[Rust][notes], [Cargo][relnotes-cargo], and [Clippy][relnotes-clippy]. + +## Contributors to 1.49.0 + +Many people came together to create Rust 1.49.0. We couldn't have done it +without all of you. [Thanks!](https://thanks.rust-lang.org/rust/1.49.0/) From ba37e8d54fef93c32af4054053cedd5c7a364c9e Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Thu, 31 Dec 2020 14:33:17 +0100 Subject: [PATCH 2/8] update version in the title --- posts/2020-12-31-Rust-1.49.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/posts/2020-12-31-Rust-1.49.0.md b/posts/2020-12-31-Rust-1.49.0.md index 31bd28204..064453eeb 100644 --- a/posts/2020-12-31-Rust-1.49.0.md +++ b/posts/2020-12-31-Rust-1.49.0.md @@ -1,6 +1,6 @@ --- layout: post -title: "Announcing Rust 1.40.0" +title: "Announcing Rust 1.49.0" author: The Rust Release Team release: true --- From cfe92da21b16143466df6bbbad58c664331f50a8 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Thu, 31 Dec 2020 15:08:39 +0100 Subject: [PATCH 3/8] reword section on aarch64 targets --- posts/2020-12-31-Rust-1.49.0.md | 50 +++++++++++++++++++++++++-------- 1 file changed, 39 insertions(+), 11 deletions(-) diff --git a/posts/2020-12-31-Rust-1.49.0.md b/posts/2020-12-31-Rust-1.49.0.md index 064453eeb..d5489498e 100644 --- a/posts/2020-12-31-Rust-1.49.0.md +++ b/posts/2020-12-31-Rust-1.49.0.md @@ -29,20 +29,48 @@ For this release, we have some new targets and an improvement to the test framework. See the [detailed release notes][notes] to learn about other changes not covered by this post. -### aarch64 targets +### 64-bit ARM Linux reaches Tier 1 -We have two big changes to three targets: +The Rust compiler supports [a wide variety of targets][platform-support], but +the Rust Team can't provide the same level of support for all of them. To +clearly mark how supported each target is we created a tiering system: -* [`aarch64-unknown-linux-gnu` is now Tier 1](https://github.com/rust-lang/rust/pull/78228) -* [`aarch64-apple-darwin` is now Tier 2](https://github.com/rust-lang/rust/pull/75991) -* [`aarch64-pc-windows-msvc` is now Tier 2](https://github.com/rust-lang/rust/pull/75914) +* Tier 3 targets are technically supported by the compiler, but we don't check + whether their code build or passes the tests, and we don't provide any + prebuilt binaries as part of our releases. +* Tier 2 targets are guaranteed to build and we provide prebuilt binaries, but + we don't execute the test suite on those platforms: the produced binaries + might not work or might have bugs. +* Tier 1 targets provide the highest support guarantee, and we run the full + suite on those platforms for every change merged in the compiler. Prebuilt + binaries are also available. -If you're not familiar with our "tiers" of support, you can read about that -on our [platform support -page](https://doc.rust-lang.org/stable/rustc/platform-support.html). In -brief, Tier 1 is "guaranteed to work," Tier 2 is "guaranteed to build," and -Tier 3 is "code exists but is not tested." If you're a 64-bit ARM user, these -changes mean that Rust programs will work better on your platforms! +Rust 1.49.0 promotes the `aarch64-unknown-linux-gnu` target to Tier 1 support, +bringing our highest guarantees to users of 64-bit ARM systems running Linux! +We expect this change to benefit workloads spanning from embedded to desktops +and servers. + +This is an important milestone for the project: it's the first time a non-x86 +target reaches the highest level of Quality Assurance and support provided by +the Rust Team, and we hope this will pave the way for more targets to reach +Tier 1 in the future! + +Note that Android is not affected by this change as it uses a different Tier 2 +target. + +[platform-support]: https://doc.rust-lang.org/stable/rustc/platform-support.html + +### 64-bit ARM macOS and Windows reach Tier 2 + +Rust 1.49.0 also features two targets reaching Tier 2 support: + +* The `aarch64-apple-darwin` target brings support for Rust on Apple M1 systems! +* The `aarch64-pc-windows-mvc` target brings support for Rust on 64-bit ARM + devices running Windows on ARM! + +Developers can expect both of those targets to have prebuilt binaries +installable with `rustup` from now on! The Rust Team is not running the test +suite on those platforms though, so there might be bugs or instabilities. ### Test framework captures output in threads From 08a6b5f9641d0c1357c81a1bd25de9f91627df44 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Thu, 31 Dec 2020 15:14:17 +0100 Subject: [PATCH 4/8] make! the! arm! section! less! excited! --- posts/2020-12-31-Rust-1.49.0.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/posts/2020-12-31-Rust-1.49.0.md b/posts/2020-12-31-Rust-1.49.0.md index d5489498e..d7b338264 100644 --- a/posts/2020-12-31-Rust-1.49.0.md +++ b/posts/2020-12-31-Rust-1.49.0.md @@ -53,7 +53,7 @@ and servers. This is an important milestone for the project: it's the first time a non-x86 target reaches the highest level of Quality Assurance and support provided by the Rust Team, and we hope this will pave the way for more targets to reach -Tier 1 in the future! +Tier 1 in the future. Note that Android is not affected by this change as it uses a different Tier 2 target. @@ -64,9 +64,9 @@ target. Rust 1.49.0 also features two targets reaching Tier 2 support: -* The `aarch64-apple-darwin` target brings support for Rust on Apple M1 systems! +* The `aarch64-apple-darwin` target brings support for Rust on Apple M1 systems. * The `aarch64-pc-windows-mvc` target brings support for Rust on 64-bit ARM - devices running Windows on ARM! + devices running Windows on ARM. Developers can expect both of those targets to have prebuilt binaries installable with `rustup` from now on! The Rust Team is not running the test From 9d0a47f0dce9449a3561ab2a84b9f9ef52e4143b Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Thu, 31 Dec 2020 15:17:43 +0100 Subject: [PATCH 5/8] I'm being told commas are useful occasionally --- posts/2020-12-31-Rust-1.49.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/posts/2020-12-31-Rust-1.49.0.md b/posts/2020-12-31-Rust-1.49.0.md index d7b338264..2dda14b4d 100644 --- a/posts/2020-12-31-Rust-1.49.0.md +++ b/posts/2020-12-31-Rust-1.49.0.md @@ -33,7 +33,7 @@ changes not covered by this post. The Rust compiler supports [a wide variety of targets][platform-support], but the Rust Team can't provide the same level of support for all of them. To -clearly mark how supported each target is we created a tiering system: +clearly mark how supported each target is, we created a tiering system: * Tier 3 targets are technically supported by the compiler, but we don't check whether their code build or passes the tests, and we don't provide any From b3d55ed42593f5a6923cbd7669e7959a4117e335 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Thu, 31 Dec 2020 15:19:57 +0100 Subject: [PATCH 6/8] reword first non-x86 target section --- posts/2020-12-31-Rust-1.49.0.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/posts/2020-12-31-Rust-1.49.0.md b/posts/2020-12-31-Rust-1.49.0.md index 2dda14b4d..b80973d93 100644 --- a/posts/2020-12-31-Rust-1.49.0.md +++ b/posts/2020-12-31-Rust-1.49.0.md @@ -50,10 +50,9 @@ bringing our highest guarantees to users of 64-bit ARM systems running Linux! We expect this change to benefit workloads spanning from embedded to desktops and servers. -This is an important milestone for the project: it's the first time a non-x86 -target reaches the highest level of Quality Assurance and support provided by -the Rust Team, and we hope this will pave the way for more targets to reach -Tier 1 in the future. +This is an important milestone for the project, since it's the first time a +non-x86 target reaches Tier 1 support: we hope this will pave the way for more +targets to reach our highest tier in the future. Note that Android is not affected by this change as it uses a different Tier 2 target. From a70a43791f194aa2c0cfbf1084d5eb430a67b8ff Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Thu, 31 Dec 2020 15:25:48 +0100 Subject: [PATCH 7/8] whelp --- posts/2020-12-31-Rust-1.49.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/posts/2020-12-31-Rust-1.49.0.md b/posts/2020-12-31-Rust-1.49.0.md index b80973d93..dce0ae2c9 100644 --- a/posts/2020-12-31-Rust-1.49.0.md +++ b/posts/2020-12-31-Rust-1.49.0.md @@ -51,8 +51,8 @@ We expect this change to benefit workloads spanning from embedded to desktops and servers. This is an important milestone for the project, since it's the first time a -non-x86 target reaches Tier 1 support: we hope this will pave the way for more -targets to reach our highest tier in the future. +non-x86 target has reached Tier 1 support: we hope this will pave the way for +more targets to reach our highest tier in the future. Note that Android is not affected by this change as it uses a different Tier 2 target. From 8de70e4014b65e77a4a8e981317a39fb24d4769f Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Thu, 31 Dec 2020 15:29:52 +0100 Subject: [PATCH 8/8] address nagisa's feedback --- posts/2020-12-31-Rust-1.49.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/posts/2020-12-31-Rust-1.49.0.md b/posts/2020-12-31-Rust-1.49.0.md index dce0ae2c9..9db825525 100644 --- a/posts/2020-12-31-Rust-1.49.0.md +++ b/posts/2020-12-31-Rust-1.49.0.md @@ -33,7 +33,7 @@ changes not covered by this post. The Rust compiler supports [a wide variety of targets][platform-support], but the Rust Team can't provide the same level of support for all of them. To -clearly mark how supported each target is, we created a tiering system: +clearly mark how supported each target is, we use a tiering system: * Tier 3 targets are technically supported by the compiler, but we don't check whether their code build or passes the tests, and we don't provide any @@ -64,7 +64,7 @@ target. Rust 1.49.0 also features two targets reaching Tier 2 support: * The `aarch64-apple-darwin` target brings support for Rust on Apple M1 systems. -* The `aarch64-pc-windows-mvc` target brings support for Rust on 64-bit ARM +* The `aarch64-pc-windows-msvc` target brings support for Rust on 64-bit ARM devices running Windows on ARM. Developers can expect both of those targets to have prebuilt binaries