Skip to content

Commit 5031dfa

Browse files
committedNov 6, 2024
Stabilize async closures
1 parent 830792e commit 5031dfa

File tree

171 files changed

+271
-497
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+271
-497
lines changed
 

‎compiler/rustc_ast_passes/src/feature_gate.rs

-5
Original file line numberDiff line numberDiff line change
@@ -510,11 +510,6 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {
510510
"you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`"
511511
);
512512
gate_all!(let_chains, "`let` expressions in this position are unstable");
513-
gate_all!(
514-
async_closure,
515-
"async closures are unstable",
516-
"to use an async block, remove the `||`: `async {`"
517-
);
518513
gate_all!(
519514
async_trait_bounds,
520515
"`async` trait bounds are unstable",

‎compiler/rustc_error_codes/src/error_codes/E0708.md

-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
Erroneous code example:
66

77
```edition2018
8-
#![feature(async_closure)]
9-
108
fn main() {
119
let add_one = async |num: u8| {
1210
num + 1
@@ -18,8 +16,6 @@ fn main() {
1816
version, you can use successfully by using move:
1917

2018
```edition2018
21-
#![feature(async_closure)]
22-
2319
fn main() {
2420
let add_one = async move |num: u8| { // ok!
2521
num + 1

0 commit comments

Comments
 (0)