about summary refs log tree commit diff
path: root/tests/ui/impl-trait/equality.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/impl-trait/equality.rs')
-rw-r--r--tests/ui/impl-trait/equality.rs13
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/ui/impl-trait/equality.rs b/tests/ui/impl-trait/equality.rs
index 828b5aac896..952f81f1978 100644
--- a/tests/ui/impl-trait/equality.rs
+++ b/tests/ui/impl-trait/equality.rs
@@ -22,7 +22,7 @@ fn sum_to(n: u32) -> impl Foo {
         0
     } else {
         n + sum_to(n - 1)
-        //~^ ERROR cannot add `impl Foo` to `u32`
+        //~^ ERROR cannot satisfy `<u32 as Add<impl Foo>>::Output == i32`
     }
 }
 
@@ -32,12 +32,15 @@ trait Leak: Sized {
 }
 impl<T> Leak for T {
     default type T = ();
-    default fn leak(self) -> Self::T { panic!() }
+    default fn leak(self) -> Self::T {
+        panic!()
+    }
 }
 impl Leak for i32 {
     type T = i32;
-    fn leak(self) -> i32 { self }
+    fn leak(self) -> i32 {
+        self
+    }
 }
 
-fn main() {
-}
+fn main() {}