]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/edition-deny-async-fns-2015.stderr
Auto merge of #99505 - joboet:futex_once, r=thomcc
[rust.git] / src / test / ui / async-await / edition-deny-async-fns-2015.stderr
1 error[E0670]: `async fn` is not permitted in Rust 2015
2   --> $DIR/edition-deny-async-fns-2015.rs:3:1
3    |
4 LL | 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
10 error[E0670]: `async fn` is not permitted in Rust 2015
11   --> $DIR/edition-deny-async-fns-2015.rs:5:12
12    |
13 LL | 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
19 error[E0670]: `async fn` is not permitted in Rust 2015
20   --> $DIR/edition-deny-async-fns-2015.rs:7:1
21    |
22 LL | 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
28 error[E0670]: `async fn` is not permitted in Rust 2015
29   --> $DIR/edition-deny-async-fns-2015.rs:8:5
30    |
31 LL |     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
37 error[E0670]: `async fn` is not permitted in Rust 2015
38   --> $DIR/edition-deny-async-fns-2015.rs:14:5
39    |
40 LL |     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
46 error[E0670]: `async fn` is not permitted in Rust 2015
47   --> $DIR/edition-deny-async-fns-2015.rs:18:5
48    |
49 LL |     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
55 error[E0670]: `async fn` is not permitted in Rust 2015
56   --> $DIR/edition-deny-async-fns-2015.rs:37:9
57    |
58 LL |         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
64 error[E0670]: `async fn` is not permitted in Rust 2015
65   --> $DIR/edition-deny-async-fns-2015.rs:27:9
66    |
67 LL |         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
73 error[E0670]: `async fn` is not permitted in Rust 2015
74   --> $DIR/edition-deny-async-fns-2015.rs:32:13
75    |
76 LL |             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
82 error[E0706]: functions in traits cannot be declared `async`
83   --> $DIR/edition-deny-async-fns-2015.rs:18:5
84    |
85 LL |     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
95 error[E0308]: mismatched types
96   --> $DIR/edition-deny-async-fns-2015.rs:18:20
97    |
98 LL |     async fn foo() {}
99    |                    ^^ expected associated type, found opaque type
100    |
101   ::: $SRC_DIR/core/src/future/mod.rs:LL:COL
102    |
103 LL | pub const fn from_generator<T>(gen: T) -> impl Future<Output = T::Return>
104    |                                           ------------------------------- the found opaque type
105    |
106    = note: expected associated type `impl Future<Output = ()>` (trait associated opaque type at <$DIR/edition-deny-async-fns-2015.rs:18:20>)
107                   found opaque type `impl Future<Output = ()>` (opaque type at <$SRC_DIR/core/src/future/mod.rs:LL:COL>)
108
109 error: aborting due to 11 previous errors
110
111 Some errors have detailed explanations: E0308, E0670, E0706.
112 For more information about an error, try `rustc --explain E0308`.