]> git.proxmox.com Git - rustc.git/blob - tests/ui/impl-trait/suggest-calling-rpit-closure.stderr
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / impl-trait / suggest-calling-rpit-closure.stderr
1 error[E0308]: mismatched types
2 --> $DIR/suggest-calling-rpit-closure.rs:2:5
3 |
4 LL | fn whatever() -> i32 {
5 | --- expected `i32` because of return type
6 LL | opaque()
7 | ^^^^^^^^ expected `i32`, found opaque type
8 ...
9 LL | fn opaque() -> impl Fn() -> i32 {
10 | ---------------- the found opaque type
11 |
12 = note: expected type `i32`
13 found opaque type `impl Fn() -> i32`
14 help: use parentheses to call this opaque type
15 |
16 LL | opaque()()
17 | ++
18
19 error: aborting due to previous error
20
21 For more information about this error, try `rustc --explain E0308`.