]> git.lizzy.rs Git - rust.git/blob - tests/ui/generator/unresolved-ct-var-drop-tracking.stderr
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / generator / unresolved-ct-var-drop-tracking.stderr
1 error[E0277]: `[(); _]` is not a future
2   --> $DIR/unresolved-ct-var-drop-tracking.rs:7:44
3    |
4 LL |         let s = std::array::from_fn(|_| ()).await;
5    |                 ---------------------------^^^^^^
6    |                 |                          |
7    |                 |                          `[(); _]` is not a future
8    |                 |                          help: remove the `.await`
9    |                 this call returns `[(); _]`
10    |
11    = help: the trait `Future` is not implemented for `[(); _]`
12    = note: [(); _] must be a future or must implement `IntoFuture` to be awaited
13    = note: required for `[(); _]` to implement `IntoFuture`
14
15 error[E0698]: type inside `async` block must be known in this context
16   --> $DIR/unresolved-ct-var-drop-tracking.rs:7:17
17    |
18 LL |         let s = std::array::from_fn(|_| ()).await;
19    |                 ^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `from_fn`
20    |
21 note: the type is part of the `async` block because of this `await`
22   --> $DIR/unresolved-ct-var-drop-tracking.rs:7:44
23    |
24 LL |         let s = std::array::from_fn(|_| ()).await;
25    |                                            ^^^^^^
26
27 error[E0698]: type inside `async` block must be known in this context
28   --> $DIR/unresolved-ct-var-drop-tracking.rs:7:17
29    |
30 LL |         let s = std::array::from_fn(|_| ()).await;
31    |                 ^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `from_fn`
32    |
33 note: the type is part of the `async` block because of this `await`
34   --> $DIR/unresolved-ct-var-drop-tracking.rs:7:44
35    |
36 LL |         let s = std::array::from_fn(|_| ()).await;
37    |                                            ^^^^^^
38
39 error[E0698]: type inside `async` block must be known in this context
40   --> $DIR/unresolved-ct-var-drop-tracking.rs:7:17
41    |
42 LL |         let s = std::array::from_fn(|_| ()).await;
43    |                 ^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `from_fn`
44    |
45 note: the type is part of the `async` block because of this `await`
46   --> $DIR/unresolved-ct-var-drop-tracking.rs:7:44
47    |
48 LL |         let s = std::array::from_fn(|_| ()).await;
49    |                                            ^^^^^^
50
51 error[E0698]: type inside `async` block must be known in this context
52   --> $DIR/unresolved-ct-var-drop-tracking.rs:7:17
53    |
54 LL |         let s = std::array::from_fn(|_| ()).await;
55    |                 ^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `from_fn`
56    |
57 note: the type is part of the `async` block because of this `await`
58   --> $DIR/unresolved-ct-var-drop-tracking.rs:7:44
59    |
60 LL |         let s = std::array::from_fn(|_| ()).await;
61    |                                            ^^^^^^
62
63 error[E0698]: type inside `async` block must be known in this context
64   --> $DIR/unresolved-ct-var-drop-tracking.rs:7:17
65    |
66 LL |         let s = std::array::from_fn(|_| ()).await;
67    |                 ^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `from_fn`
68    |
69 note: the type is part of the `async` block because of this `await`
70   --> $DIR/unresolved-ct-var-drop-tracking.rs:7:44
71    |
72 LL |         let s = std::array::from_fn(|_| ()).await;
73    |                                            ^^^^^^
74
75 error: aborting due to 6 previous errors
76
77 Some errors have detailed explanations: E0277, E0698.
78 For more information about an error, try `rustc --explain E0277`.