File tree 2 files changed +27
-1
lines changed
2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -397,6 +397,7 @@ E0718: include_str!("./error_codes/E0718.md"),
397
397
E0720 : include_str!( "./error_codes/E0720.md" ) ,
398
398
E0723 : include_str!( "./error_codes/E0723.md" ) ,
399
399
E0725 : include_str!( "./error_codes/E0725.md" ) ,
400
+ E0727 : include_str!( "./error_codes/E0727.md" ) ,
400
401
E0728 : include_str!( "./error_codes/E0728.md" ) ,
401
402
E0729 : include_str!( "./error_codes/E0729.md" ) ,
402
403
E0730 : include_str!( "./error_codes/E0730.md" ) ,
@@ -607,6 +608,5 @@ E0746: include_str!("./error_codes/E0746.md"),
607
608
E0722 , // Malformed `#[optimize]` attribute
608
609
E0724 , // `#[ffi_returns_twice]` is only allowed in foreign functions
609
610
E0726 , // non-explicit (not `'_`) elided lifetime in unsupported position
610
- E0727 , // `async` generators are not yet supported
611
611
E0739 , // invalid track_caller application/syntax
612
612
}
Original file line number Diff line number Diff line change
1
+ A ` yield ` clause was used in an ` async ` context.
2
+
3
+ Example of erroneous code:
4
+
5
+ ``` compile_fail
6
+ #![feature(generators)]
7
+
8
+ let generator = || {
9
+ async {
10
+ yield;
11
+ }
12
+ };
13
+ ```
14
+
15
+ Here, the ` yield ` keyword is used in an ` async ` block,
16
+ which is not yet supported.
17
+
18
+ To fix this error, you have to move ` yield ` out of the ` async ` block:
19
+
20
+ ```
21
+ #![feature(generators)]
22
+
23
+ let generator = || {
24
+ yield;
25
+ };
26
+ ```
You can’t perform that action at this time.
0 commit comments