error[E0308]: mismatched types
--> $DIR/issue-74280.rs:9:5
|
+LL | type Test = impl Copy;
+ | --------- the expected opaque type
+LL |
+LL | fn test() -> Test {
+ | ---- expected `Test` because of return type
+LL | let y = || -> Test { () };
LL | 7
| ^ expected `()`, found integer
+ |
+ = note: expected opaque type `Test`
+ found type `{integer}`
error: aborting due to previous error