]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/higher-rank-trait-bounds/issue-62203-hrtb-ice.rs
Point at specific field in struct literal when trait fulfillment fails
[rust.git] / tests / ui / higher-rank-trait-bounds / issue-62203-hrtb-ice.rs
index e70f6fc3430f67726e0192f0119ffd3657d5cff2..6d3bb9bbb771533597efe5836c852030577de108 100644 (file)
@@ -35,16 +35,14 @@ trait Ty<'a> {
 }
 
 fn main() {
-    let v = Unit2.m(
-        L {
-            //~^ ERROR to be a closure that returns `Unit3`, but it returns `Unit4`
-            //~| ERROR type mismatch
-            f: |x| {
-                drop(x);
-                Unit4
-            },
+    let v = Unit2.m(L {
+        //~^ ERROR type mismatch
+        //~| ERROR to be a closure that returns `Unit3`, but it returns `Unit4`
+        f: |x| {
+            drop(x);
+            Unit4
         },
-    );
+    });
 }
 
 impl<'a> Ty<'a> for Unit2 {