• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1error[E0670]: `async fn` is not permitted in Rust 2015
2  --> $DIR/edition-deny-async-fns-2015.rs:5:1
3   |
4LL | async fn foo() {}
5   | ^^^^^ to use `async fn`, switch to Rust 2018 or later
6   |
7   = help: pass `--edition 2021` to `rustc`
8   = note: for more on editions, read https://doc.rust-lang.org/edition-guide
9
10error[E0670]: `async fn` is not permitted in Rust 2015
11  --> $DIR/edition-deny-async-fns-2015.rs:7:12
12   |
13LL | fn baz() { async fn foo() {} }
14   |            ^^^^^ to use `async fn`, switch to Rust 2018 or later
15   |
16   = help: pass `--edition 2021` to `rustc`
17   = note: for more on editions, read https://doc.rust-lang.org/edition-guide
18
19error[E0670]: `async fn` is not permitted in Rust 2015
20  --> $DIR/edition-deny-async-fns-2015.rs:9:1
21   |
22LL | async fn async_baz() {
23   | ^^^^^ to use `async fn`, switch to Rust 2018 or later
24   |
25   = help: pass `--edition 2021` to `rustc`
26   = note: for more on editions, read https://doc.rust-lang.org/edition-guide
27
28error[E0670]: `async fn` is not permitted in Rust 2015
29  --> $DIR/edition-deny-async-fns-2015.rs:10:5
30   |
31LL |     async fn bar() {}
32   |     ^^^^^ to use `async fn`, switch to Rust 2018 or later
33   |
34   = help: pass `--edition 2021` to `rustc`
35   = note: for more on editions, read https://doc.rust-lang.org/edition-guide
36
37error[E0670]: `async fn` is not permitted in Rust 2015
38  --> $DIR/edition-deny-async-fns-2015.rs:16:5
39   |
40LL |     async fn foo() {}
41   |     ^^^^^ to use `async fn`, switch to Rust 2018 or later
42   |
43   = help: pass `--edition 2021` to `rustc`
44   = note: for more on editions, read https://doc.rust-lang.org/edition-guide
45
46error[E0670]: `async fn` is not permitted in Rust 2015
47  --> $DIR/edition-deny-async-fns-2015.rs:20:5
48   |
49LL |     async fn foo() {}
50   |     ^^^^^ to use `async fn`, switch to Rust 2018 or later
51   |
52   = help: pass `--edition 2021` to `rustc`
53   = note: for more on editions, read https://doc.rust-lang.org/edition-guide
54
55error[E0670]: `async fn` is not permitted in Rust 2015
56  --> $DIR/edition-deny-async-fns-2015.rs:38:9
57   |
58LL |         async fn bar() {}
59   |         ^^^^^ to use `async fn`, switch to Rust 2018 or later
60   |
61   = help: pass `--edition 2021` to `rustc`
62   = note: for more on editions, read https://doc.rust-lang.org/edition-guide
63
64error[E0670]: `async fn` is not permitted in Rust 2015
65  --> $DIR/edition-deny-async-fns-2015.rs:28:9
66   |
67LL |         async fn foo() {}
68   |         ^^^^^ to use `async fn`, switch to Rust 2018 or later
69   |
70   = help: pass `--edition 2021` to `rustc`
71   = note: for more on editions, read https://doc.rust-lang.org/edition-guide
72
73error[E0670]: `async fn` is not permitted in Rust 2015
74  --> $DIR/edition-deny-async-fns-2015.rs:33:13
75   |
76LL |             async fn bar() {}
77   |             ^^^^^ to use `async fn`, switch to Rust 2018 or later
78   |
79   = help: pass `--edition 2021` to `rustc`
80   = note: for more on editions, read https://doc.rust-lang.org/edition-guide
81
82error[E0706]: functions in traits cannot be declared `async`
83  --> $DIR/edition-deny-async-fns-2015.rs:20:5
84   |
85LL |     async fn foo() {}
86   |     -----^^^^^^^^^
87   |     |
88   |     `async` because of this
89   |
90   = note: `async` trait functions are not currently supported
91   = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
92   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
93   = help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable
94
95error: aborting due to 10 previous errors
96
97Some errors have detailed explanations: E0670, E0706.
98For more information about an error, try `rustc --explain E0670`.
99