]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/type-alias-impl-trait/issue-74280.stderr
Auto merge of #95454 - randomicon00:fix95444, r=wesleywiser
[rust.git] / src / test / ui / type-alias-impl-trait / issue-74280.stderr
index f6b369dd8d51827d0ec572e925405673d318779a..7a22b360a31d0b1f160ec93e34ec5aa254918725 100644 (file)
@@ -1,8 +1,17 @@
 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