Skip to content

Commit 67d42b5

Browse files
committed
Mark E0802 examples as 2018 edition
1 parent 5f7bb5f commit 67d42b5

File tree

1 file changed

+2
-2
lines changed
  • compiler/rustc_error_codes/src/error_codes

1 file changed

+2
-2
lines changed

compiler/rustc_error_codes/src/error_codes/E0802.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ The `Async{Fn, FnMut, FnOnce}` traits are not yet dyn compatible.
22

33
Erroneous code example:
44

5-
```compile_fail,E0802
5+
```compile_fail,E0802,edition2018
66
async fn call_async_fn_twice(some_fn: &dyn AsyncFn()) {
77
some_fn().await;
88
some_fn().await;
@@ -11,7 +11,7 @@ async fn call_async_fn_twice(some_fn: &dyn AsyncFn()) {
1111

1212
One workaround to this issue is to use `impl Async...` instead:
1313

14-
```
14+
```edition2018
1515
async fn call_async_fn_twice(some_fn: &impl AsyncFn()) {
1616
some_fn().await;
1717
some_fn().await;

0 commit comments

Comments
 (0)