]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/async-trait-fn.stderr
Merge commit 'd3a2366ee877075c59b38bd8ced55f224fc7ef51' into sync_cg_clif-2022-07-26
[rust.git] / src / test / ui / async-await / async-trait-fn.stderr
1 error[E0706]: functions in traits cannot be declared `async`
2   --> $DIR/async-trait-fn.rs:3:5
3    |
4 LL |     async fn foo() {}
5    |     -----^^^^^^^^^^^^
6    |     |
7    |     `async` because of this
8    |
9    = note: `async` trait functions are not currently supported
10    = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
11
12 error[E0706]: functions in traits cannot be declared `async`
13   --> $DIR/async-trait-fn.rs:4:5
14    |
15 LL |     async fn bar(&self) {}
16    |     -----^^^^^^^^^^^^^^^^^
17    |     |
18    |     `async` because of this
19    |
20    = note: `async` trait functions are not currently supported
21    = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
22
23 error[E0706]: functions in traits cannot be declared `async`
24   --> $DIR/async-trait-fn.rs:5:5
25    |
26 LL |       async fn baz() {
27    |       ^----
28    |       |
29    |  _____`async` because of this
30    | |
31 LL | |         // Nested item must not ICE.
32 LL | |         fn a() {}
33 LL | |     }
34    | |_____^
35    |
36    = note: `async` trait functions are not currently supported
37    = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
38
39 error: aborting due to 3 previous errors
40
41 For more information about this error, try `rustc --explain E0706`.