about summary refs log tree commit diff
path: root/tests/ui/c-variadic/no-closure.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/c-variadic/no-closure.rs')
-rw-r--r--tests/ui/c-variadic/no-closure.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/ui/c-variadic/no-closure.rs b/tests/ui/c-variadic/no-closure.rs
index c0b77786e8b..830ed962a8c 100644
--- a/tests/ui/c-variadic/no-closure.rs
+++ b/tests/ui/c-variadic/no-closure.rs
@@ -4,14 +4,17 @@
 // Check that `...` in closures is rejected.
 
 const F: extern "C" fn(...) = |_: ...| {};
-//~^ ERROR C-variadic type `...` may not be nested inside another type
+//~^ ERROR: unexpected `...`
+//~| NOTE: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
 
 fn foo() {
     let f = |...| {};
-    //~^ ERROR: `..` patterns are not allowed here
-    //~| ERROR: unexpected `...`
+    //~^ ERROR: unexpected `...`
+    //~| NOTE: not a valid pattern
+    //~| NOTE: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
 
     let f = |_: ...| {};
-    //~^ ERROR C-variadic type `...` may not be nested inside another type
+    //~^ ERROR: unexpected `...`
+    //~| NOTE: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
     f(1i64)
 }