]> git.proxmox.com Git - rustc.git/blobdiff - tests/ui/rfcs/rfc-2396-target_feature-11/fn-traits.rs
New upstream version 1.75.0+dfsg1
[rustc.git] / tests / ui / rfcs / rfc-2396-target_feature-11 / fn-traits.rs
index 43bda49624e96e91df4fa34f046ca999f849ff6f..1374ad935a388c8d00f3a172245fdccd437b7c01 100644 (file)
@@ -21,14 +21,14 @@ fn call_once(f: impl FnOnce()) {
 }
 
 fn main() {
-    call(foo); //~ ERROR expected a `Fn<()>` closure, found `fn() {foo}`
-    call_mut(foo); //~ ERROR expected a `FnMut<()>` closure, found `fn() {foo}`
-    call_once(foo); //~ ERROR expected a `FnOnce<()>` closure, found `fn() {foo}`
+    call(foo); //~ ERROR expected a `Fn()` closure, found `fn() {foo}`
+    call_mut(foo); //~ ERROR expected a `FnMut()` closure, found `fn() {foo}`
+    call_once(foo); //~ ERROR expected a `FnOnce()` closure, found `fn() {foo}`
 
     call(foo_unsafe);
-    //~^ ERROR expected a `Fn<()>` closure, found `unsafe fn() {foo_unsafe}`
+    //~^ ERROR expected a `Fn()` closure, found `unsafe fn() {foo_unsafe}`
     call_mut(foo_unsafe);
-    //~^ ERROR expected a `FnMut<()>` closure, found `unsafe fn() {foo_unsafe}`
+    //~^ ERROR expected a `FnMut()` closure, found `unsafe fn() {foo_unsafe}`
     call_once(foo_unsafe);
-    //~^ ERROR expected a `FnOnce<()>` closure, found `unsafe fn() {foo_unsafe}`
+    //~^ ERROR expected a `FnOnce()` closure, found `unsafe fn() {foo_unsafe}`
 }