1
+ error[E0308]: mismatched types
2
+ --> $DIR/lazy_subtyping_of_opaques.rs:11:5
3
+ |
4
+ LL | fn reify_as_tait() -> Thunk<Tait> {
5
+ | ----------- expected `Thunk<_>` because of return type
6
+ LL |
7
+ LL | Thunk::new(|cont| cont)
8
+ | ^^^^^^^^^^^^^^^^^^^^^^^ expected `Thunk<_>`, found `()`
9
+ |
10
+ = note: expected struct `Thunk<_>`
11
+ found unit type `()`
12
+
1
13
error[E0277]: expected a `FnOnce()` closure, found `()`
2
14
--> $DIR/lazy_subtyping_of_opaques.rs:11:23
3
15
|
@@ -12,19 +24,13 @@ error[E0277]: expected a `FnOnce()` closure, found `()`
12
24
|
13
25
LL | fn reify_as_tait() -> Thunk<Tait> {
14
26
| ^^^^^^^^^^^ expected an `FnOnce()` closure, found `()`
27
+ LL |
28
+ LL | Thunk::new(|cont| cont)
29
+ | ----------------------- return type was inferred to be `{type error}` here
15
30
|
16
31
= help: the trait `FnOnce()` is not implemented for `()`
17
32
= note: wrap the `()` in a closure with no arguments: `|| { /* code */ }`
18
33
19
- error[E0308]: mismatched types
20
- --> $DIR/lazy_subtyping_of_opaques.rs:11:5
21
- |
22
- LL | Thunk::new(|cont| cont)
23
- | ^^^^^^^^^^^^^^^^^^^^^^^ expected `Thunk<_>`, found `()`
24
- |
25
- = note: expected struct `Thunk<_>`
26
- found unit type `()`
27
-
28
34
error: aborting due to 3 previous errors
29
35
30
36
Some errors have detailed explanations: E0277, E0308.
0 commit comments