8000 Merge pull request #1062 from Mark-Simulacrum/rust-167 · ehuss/blog.rust-lang.org@9964a33 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9964a33

Browse files
Merge pull request rust-lang#1062 from Mark-Simulacrum/rust-167
Rust 1.67.0 release
2 parents 674d11d + 48d93f2 commit 9964a33

File tree

1 file changed

+101
-0
lines changed

1 file changed

+101
-0
lines changed

posts/2023-01-26-Rust-1.67.0.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
---
2+
layout: post
3+
title: "Announcing Rust 1.67.0"
4+
author: The Rust Release Team
5+
release: true
6+
---
7+
8+
The Rust team is happy to announce a new version of Rust, 1.67.0. Rust is a
9+
programming language empowering everyone to build reliable and efficient
10+
software.
11+
12+
If you have a previous version of Rust installed via rustup, you can get 1.67.0
13+
with:
14+
15+
```console
16+
rustup update stable
17+
```
18+
19+
If you don't have it already, you can [get
20+
`rustup`](https://www.rust-lang.org/install.html) from the appropriate page on
21+
our website, and check out the [detailed release notes for
22+
1.67.0](https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1670-2023-01-26)
23+
on GitHub.
24+
25+
If you'd like to help us out by testing future releases, you might consider
26+
updating locally to use the beta channel (`rustup default beta`) or the nightly
27+
channel (`rustup default nightly`). Please
28+
[report](https://github.com/rust-lang/rust/issues/new/choose) any bugs you
29+
might come across!
30+
31+
## What's in 1.67.0 stable
32+
33+
### `#[must_use]` effective on `async fn`
34+
35+
`async` functions annotated with `#[must_use]` now apply that attribute to the
36+
output of the returned `impl Future`. The `Future` trait itself is already
37+
annotated with `#[must_use]`, so all types implementing `Future` are
38+
automatically `#[must_use]`, which meant that previously there was no way to
39+
indicate that the output of the `Future` is itself significant and should be used in some way.
40+
41+
With 1.67, the compiler will now warn if the output isn't used in some way.
42+
43+
```rust
44+
#[must_use]
45+
async fn bar() -> u32 { 0 }
46+
47+
async fn caller() {
48+
bar().await;
49+
}
50+
```
51+
52+
```
53+
warning: unused output of future returned by `bar` that must be used
54+
--> src/lib.rs:5:5
55+
|
56+
5 | bar().await;
57+
| ^^^^^^^^^^^
58+
|
59+
= note: `#[warn(unused_must_use)]` on by default
60+
```
61+
62+
### `std::sync::mpsc` implementation updated
63+
64+
Rust's standard library has had a multi-producer, single-consumer channel since
65+
before 1.0, but in this release the implementation is switched out to be based
66+
on [`crossbeam-channel`](https://crates.io/crates/crossbeam-channel). This
67+
release contains no API changes, but the new implementation fixes a number of
68+
bugs and improves the performance and maintainability of the implementation.
69+
70+
Users should not notice any significant changes in behavior as of this release.
71+
72+
### Stabilized APIs
73+
74+
- [`{integer}::checked_ilog`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.checked_ilog)
75+
- [`{integer}::checked_ilog2`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.checked_ilog2)
76+
- [`{integer}::checked_ilog10`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.checked_ilog10)
77+
- [`{integer}::ilog`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.ilog)
78+
- [`{integer}::ilog2`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.ilog2)
79+
- [`{integer}::ilog10`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.ilog10)
80+
- [`NonZeroU*::ilog2`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroU32.html#method.ilog2)
81+
- [`NonZeroU*::ilog10`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroU32.html#method.ilog10)
82+
- [`NonZero*::BITS`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroU32.html#associatedconstant.BITS)
83+
84+
These APIs are now stable in const contexts:
85+
86+
- [`char::from_u32`](https://doc.rust-lang.org/stable/std/primitive.char.html#method.from_u32)
87+
- [`char::from_digit`](https://doc.rust-lang.org/stable/std/primitive.char.html#method.from_digit)
88+
- [`char::to_digit`](https://doc.rust-lang.org/stable/std/primitive.char.html#method.to_digit)
89+
- [`core::char::from_u32`](https://doc.rust-lang.org/stable/core/char/fn.from_u32.html)
90+
- [`core::char::from_digit`](https://doc.rust-lang.org/stable/core/char/fn.from_digit.html)
91+
92+
Check out everything that changed in
93+
[Rust](https://github.com/rust-lang/rust/blob/stable/RELEASES.md#version-1670-2023-01-26),
94+
[Cargo](https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-167-2023-01-26),
95+
and [Clippy](https://github.com/rust-lang/rust-clippy/blob/master/CHANGELOG.md#rust-167).
96+
97+
### Contributors to 1.67.0
98+
99+
Many people came together to create Rust 1.67.0.
100+
We couldn't have done it without all of you.
101+
[Thanks!](https://thanks.rust-lang.org/rust/1.67.0/)

0 commit comments

Comments
 (0)
0