summary refs log tree commit diff
path: root/tests/ui/impl-trait/recursive-coroutine-boxed.next.stderr
blob: 96db2030a405c887ca3198834cbba10819bd2e87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
error[E0282]: type annotations needed
  --> $DIR/recursive-coroutine-boxed.rs:15:23
   |
LL |         let mut gen = Box::pin(foo());
   |                       ^^^^^^^^ cannot infer type of the type parameter `T` declared on the struct `Box`
LL |
LL |         let mut r = gen.as_mut().resume(());
   |                         ------ type must be known at this point
   |
help: consider specifying the generic argument
   |
LL |         let mut gen = Box::<T>::pin(foo());
   |                          +++++

error[E0308]: mismatched types
  --> $DIR/recursive-coroutine-boxed.rs:14:18
   |
LL |   fn foo() -> impl Coroutine<Yield = (), Return = ()> {
   |               ---------------------------------------
   |               |
   |               the expected opaque type
   |               expected `impl Coroutine<Yield = (), Return = ()>` because of return type
...
LL |       #[coroutine] || {
   |  __________________^
LL | |         let mut gen = Box::pin(foo());
LL | |
LL | |         let mut r = gen.as_mut().resume(());
...  |
LL | |         }
LL | |     }
   | |_____^ types differ
   |
   = note: expected opaque type `impl Coroutine<Yield = (), Return = ()>`
                found coroutine `{coroutine@$DIR/recursive-coroutine-boxed.rs:14:18: 14:20}`

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0282, E0308.
For more information about an error, try `rustc --explain E0282`.