]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/type-alias-impl-trait/issue-63279.rs
Auto merge of #95454 - randomicon00:fix95444, r=wesleywiser
[rust.git] / src / test / ui / type-alias-impl-trait / issue-63279.rs
index 875cce4df2390b0d9ad38d7c9d2bab320a5a6986..057a908bbee7477ebc76e1a4fee02e37ca103e98 100644 (file)
@@ -5,7 +5,10 @@
 type Closure = impl FnOnce();
 
 fn c() -> Closure {
-    || -> Closure { || () } //~ ERROR: mismatched types
+    || -> Closure { || () }
+    //~^ ERROR: mismatched types
+    //~| ERROR: mismatched types
+    //~| ERROR: expected a `FnOnce<()>` closure, found `()`
 }
 
 fn main() {}