18 lines
547 B
Plaintext
18 lines
547 B
Plaintext
error[E0308]: mismatched types
|
|
--> $DIR/existential-printing.rs:7:13
|
|
|
|
|
LL | fn f() -> impl FnOnce<()> { || () }
|
|
| --------------- the expected opaque type
|
|
LL |
|
|
LL | fn main() { () = f(); }
|
|
| ^^ --- this expression has type `impl FnOnce<()>`
|
|
| |
|
|
| expected opaque type, found `()`
|
|
|
|
|
= note: expected opaque type `impl FnOnce<()>`
|
|
found unit type `()`
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|