]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/fn/fn-trait-formatting.rs
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / fn / fn-trait-formatting.rs
index 5c16c1a7e88b7d53a47f95b5f8fba1702991d927..63ab8e88e4459123990c3c315e3c569a60b0b0f7 100644 (file)
@@ -5,16 +5,16 @@ fn needs_fn<F>(x: F) where F: Fn(isize) -> isize {}
 fn main() {
     let _: () = (box |_: isize| {}) as Box<dyn FnOnce(isize)>;
     //~^ ERROR mismatched types
-    //~| expected type `()`
-    //~| found type `std::boxed::Box<dyn std::ops::FnOnce(isize)>`
+    //~| expected unit type `()`
+    //~| found struct `std::boxed::Box<dyn std::ops::FnOnce(isize)>`
     let _: () = (box |_: isize, isize| {}) as Box<dyn Fn(isize, isize)>;
     //~^ ERROR mismatched types
-    //~| expected type `()`
-    //~| found type `std::boxed::Box<dyn std::ops::Fn(isize, isize)>`
+    //~| expected unit type `()`
+    //~| found struct `std::boxed::Box<dyn std::ops::Fn(isize, isize)>`
     let _: () = (box || -> isize { unimplemented!() }) as Box<dyn FnMut() -> isize>;
     //~^ ERROR mismatched types
-    //~| expected type `()`
-    //~| found type `std::boxed::Box<dyn std::ops::FnMut() -> isize>`
+    //~| expected unit type `()`
+    //~| found struct `std::boxed::Box<dyn std::ops::FnMut() -> isize>`
 
     needs_fn(1);
     //~^ ERROR expected a `std::ops::Fn<(isize,)>` closure, found `{integer}`