From 02139e45b4a45322e309c52c2535a17d909d6347 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Thu, 28 May 2020 14:23:19 -0500 Subject: [PATCH 1/6] Rust 1.44 release announcement --- posts/2020-06-04-Rust-1.44.0.md | 116 ++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 posts/2020-06-04-Rust-1.44.0.md diff --git a/posts/2020-06-04-Rust-1.44.0.md b/posts/2020-06-04-Rust-1.44.0.md new file mode 100644 index 000000000..faa4919dc --- /dev/null +++ b/posts/2020-06-04-Rust-1.44.0.md @@ -0,0 +1,116 @@ +--- +layout: post +title: "Announcing Rust 1.44.0" +author: The Rust Release Team +release: true +--- + +The Rust team is happy to announce a new version of Rust, 1.44.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.44.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.44.0][notes] on GitHub. + +[install]: https://www.rust-lang.org/install.html +[notes]: https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1440-2020-06-04 + +## What's in 1.44.0 stable + +Rust 1.44 is a smaller release, containing almost exclusively polish and a +few new stabilized standard library APIs. + +`cargo tree` is a very old, popular extension to Cargo. Originally released +in December of 2015, and with almost 50,000 downloads, [we have decided to +add it to Cargo directly][cargotree]. If you haven't used it in the past, +`cargo tree` will print your dependency tree to the console: + +```text + mdbook v0.3.2 (/Users/src/rust/mdbook) +├── ammonia v3.0.0 +│ ├── html5ever v0.24.0 +│ │ ├── log v0.4.8 +│ │ │ └── cfg-if v0.1.9 +│ │ ├── mac v0.1.1 +│ │ └── markup5ever v0.9.0 +│ │ ├── log v0.4.8 (*) +│ │ ├── phf v0.7.24 +│ │ │ └── phf_shared v0.7.24 +│ │ │ ├── siphasher v0.2.3 +│ │ │ └── unicase v1.4.2 +│ │ │ [build-dependencies] +│ │ │ └── version_check v0.1.5 +... +``` + +In this example, the `mdbook` package depends on the `ammonia` package, +which itself depends on `html5ever`, which depends on `log`, `mac`, and +`markup5ever`... and so on. + +This release also marks an extension to `async`/`await`: [it can now be used +in `no_std` context][asyncawaitnostd]. The initial implemenation of this feature required +thread local storage, but that was a temporary situation. In this release, +this requirement has been removed, meaning that you no longer require +`libstd` to use `async`/`await`. + +[cargotree]: https://github.com/rust-lang/cargo/pull/8062/ +[asyncawaitnostd]: https://github.com/rust-lang/rust/pull/69033/ + +### Library changes + +[`vec![]` can now be used in `const` contexts.][70632] Note that this is only +empty vectors; you can only do `vec![]`, not `vec![1, 2, 3]`. + +[Unicode 13 is now supported.][69929] + +[`Vec` now implements `From<[T; N]>`.][68692] Where `N` is less than 32. + +Additionally, we stabilized 11 new APIs: + +- [`PathBuf::with_capacity`] +- [`PathBuf::capacity`] +- [`PathBuf::clear`] +- [`PathBuf::reserve`] +- [`PathBuf::reserve_exact`] +- [`PathBuf::shrink_to_fit`] +- [`f32::to_int_unchecked`] +- [`f64::to_int_unchecked`] +- [`Layout::align_to`] +- [`Layout::pad_to_align`] +- [`Layout::array`] + +[70632]: https://github.com/rust-lang/rust/pull/70632/ +[69929]: https://github.com/rust-lang/rust/pull/69929/ +[68692]: https://github.com/rust-lang/rust/pull/68692/ +[`PathBuf::with_capacity`]: https://doc.rust-lang.org/beta/std/path/struct.PathBuf.html#method.with_capacity +[`PathBuf::capacity`]: https://doc.rust-lang.org/beta/std/path/struct.PathBuf.html#method.capacity +[`PathBuf::clear`]: https://doc.rust-lang.org/beta/std/path/struct.PathBuf.html#method.clear +[`PathBuf::reserve`]: https://doc.rust-lang.org/beta/std/path/struct.PathBuf.html#method.reserve +[`PathBuf::reserve_exact`]: https://doc.rust-lang.org/beta/std/path/struct.PathBuf.html#method.reserve_exact +[`PathBuf::shrink_to_fit`]: https://doc.rust-lang.org/beta/std/path/struct.PathBuf.html#method.shrink_to_fit +[`f32::to_int_unchecked`]: https://doc.rust-lang.org/beta/std/primitive.f32.html#method.to_int_unchecked +[`f64::to_int_unchecked`]: https://doc.rust-lang.org/beta/std/primitive.f64.html#method.to_int_unchecked +[`Layout::align_to`]: https://doc.rust-lang.org/beta/std/alloc/struct.Layout.html#method.align_to +[`Layout::pad_to_align`]: https://doc.rust-lang.org/beta/std/alloc/struct.Layout.html#method.pad_to_align +[`Layout::array`]: https://doc.rust-lang.org/beta/std/alloc/struct.Layout.html#method.array + +### Other changes + +[relnotes-cargo]: https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-144-2020-06-04 +[relnotes-clippy]: https://github.com/rust-lang/rust-clippy/blob/master/CHANGELOG.md#rust-144 + +There are other changes in the Rust 1.44.0 release: check out what changed in +[Rust][notes], [Cargo][relnotes-cargo], and [Clippy][relnotes-clippy]. + +## Contributors to 1.44.0 + +Many people came together to create Rust 1.44.0. We couldn't have done it +without all of you. [Thanks!](https://thanks.rust-lang.org/rust/1.44.0/) From e1a6147b835ad6df506147a0f445200c6647d9af Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Mon, 1 Jun 2020 08:17:45 -0500 Subject: [PATCH 2/6] Update posts/2020-06-04-Rust-1.44.0.md Co-authored-by: Mark Rousskov --- posts/2020-06-04-Rust-1.44.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/posts/2020-06-04-Rust-1.44.0.md b/posts/2020-06-04-Rust-1.44.0.md index faa4919dc..50bbdae26 100644 --- a/posts/2020-06-04-Rust-1.44.0.md +++ b/posts/2020-06-04-Rust-1.44.0.md @@ -58,8 +58,8 @@ which itself depends on `html5ever`, which depends on `log`, `mac`, and This release also marks an extension to `async`/`await`: [it can now be used in `no_std` context][asyncawaitnostd]. The initial implemenation of this feature required thread local storage, but that was a temporary situation. In this release, -this requirement has been removed, meaning that you no longer require -`libstd` to use `async`/`await`. +this requirement has been removed, meaning that `libstd` is no longer required +to use `async`/`await`. [cargotree]: https://github.com/rust-lang/cargo/pull/8062/ [asyncawaitnostd]: https://github.com/rust-lang/rust/pull/69033/ From 207fa71cf12501732e595b64db05fc0fc7ecffd5 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Mon, 1 Jun 2020 08:17:52 -0500 Subject: [PATCH 3/6] Update posts/2020-06-04-Rust-1.44.0.md Co-authored-by: Kyle J Strand --- posts/2020-06-04-Rust-1.44.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/posts/2020-06-04-Rust-1.44.0.md b/posts/2020-06-04-Rust-1.44.0.md index 50bbdae26..eaf996121 100644 --- a/posts/2020-06-04-Rust-1.44.0.md +++ b/posts/2020-06-04-Rust-1.44.0.md @@ -56,7 +56,7 @@ which itself depends on `html5ever`, which depends on `log`, `mac`, and `markup5ever`... and so on. This release also marks an extension to `async`/`await`: [it can now be used -in `no_std` context][asyncawaitnostd]. The initial implemenation of this feature required +in `no_std` contexts][asyncawaitnostd]. The initial implemenation of this feature required thread local storage, but that was a temporary situation. In this release, this requirement has been removed, meaning that `libstd` is no longer required to use `async`/`await`. From f5d702258c1a63af6020ab6136fe606d14f8e9ca Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Mon, 1 Jun 2020 08:17:58 -0500 Subject: [PATCH 4/6] Update posts/2020-06-04-Rust-1.44.0.md Co-authored-by: Kyle J Strand --- posts/2020-06-04-Rust-1.44.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/posts/2020-06-04-Rust-1.44.0.md b/posts/2020-06-04-Rust-1.44.0.md index eaf996121..c62f12a02 100644 --- a/posts/2020-06-04-Rust-1.44.0.md +++ b/posts/2020-06-04-Rust-1.44.0.md @@ -71,7 +71,7 @@ empty vectors; you can only do `vec![]`, not `vec![1, 2, 3]`. [Unicode 13 is now supported.][69929] -[`Vec` now implements `From<[T; N]>`.][68692] Where `N` is less than 32. +[`Vec` now implements `From<[T; N]>`][68692] where `N` is less than 32. Additionally, we stabilized 11 new APIs: From c52f0a4f8e887eb6f54ede67212372a399e9d315 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Mon, 1 Jun 2020 08:18:10 -0500 Subject: [PATCH 5/6] Update posts/2020-06-04-Rust-1.44.0.md Co-authored-by: Josh Triplett --- posts/2020-06-04-Rust-1.44.0.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/posts/2020-06-04-Rust-1.44.0.md b/posts/2020-06-04-Rust-1.44.0.md index c62f12a02..0dd625959 100644 --- a/posts/2020-06-04-Rust-1.44.0.md +++ b/posts/2020-06-04-Rust-1.44.0.md @@ -55,6 +55,8 @@ In this example, the `mdbook` package depends on the `ammonia` package, which itself depends on `html5ever`, which depends on `log`, `mac`, and `markup5ever`... and so on. +You can also use `cargo tree -d` (shorthand for `cargo tree --duplicates`) to show any dependencies on multiple versions of the same crate. This will show one entry for each version of each dependency, and an inverted dependency tree showing how that version gets pulled in. + This release also marks an extension to `async`/`await`: [it can now be used in `no_std` contexts][asyncawaitnostd]. The initial implemenation of this feature required thread local storage, but that was a temporary situation. In this release, From c982b752b67028806d8e7286cd34e9558a4cb4e4 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Mon, 1 Jun 2020 08:18:27 -0500 Subject: [PATCH 6/6] Update posts/2020-06-04-Rust-1.44.0.md Co-authored-by: Kyle J Strand --- posts/2020-06-04-Rust-1.44.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/posts/2020-06-04-Rust-1.44.0.md b/posts/2020-06-04-Rust-1.44.0.md index 0dd625959..0fd605b86 100644 --- a/posts/2020-06-04-Rust-1.44.0.md +++ b/posts/2020-06-04-Rust-1.44.0.md @@ -68,8 +68,8 @@ to use `async`/`await`. ### Library changes -[`vec![]` can now be used in `const` contexts.][70632] Note that this is only -empty vectors; you can only do `vec![]`, not `vec![1, 2, 3]`. +[`vec![]` can now be used in `const` contexts.][70632] Note that only +empty vectors can be created; `vec![]` will compile, but `vec![1, 2, 3]` will not. [Unicode 13 is now supported.][69929]