]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/async-trait-fn.stderr
Rollup merge of #71627 - ldm0:autoderefarg, r=Dylan-DPC
[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: aborting due to 2 previous errors
24
25 For more information about this error, try `rustc --explain E0706`.