about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tests/ui/c-variadic/no-closure.rs3
-rw-r--r--tests/ui/c-variadic/no-closure.stderr18
2 files changed, 4 insertions, 17 deletions
diff --git a/tests/ui/c-variadic/no-closure.rs b/tests/ui/c-variadic/no-closure.rs
index c0b77786e8b..a5b791fbca8 100644
--- a/tests/ui/c-variadic/no-closure.rs
+++ b/tests/ui/c-variadic/no-closure.rs
@@ -8,8 +8,7 @@ const F: extern "C" fn(...) = |_: ...| {};
 
 fn foo() {
     let f = |...| {};
-    //~^ ERROR: `..` patterns are not allowed here
-    //~| ERROR: unexpected `...`
+    //~^ ERROR: unexpected `...`
 
     let f = |_: ...| {};
     //~^ ERROR C-variadic type `...` may not be nested inside another type
diff --git a/tests/ui/c-variadic/no-closure.stderr b/tests/ui/c-variadic/no-closure.stderr
index 77bd106bb95..ad635a29ab4 100644
--- a/tests/ui/c-variadic/no-closure.stderr
+++ b/tests/ui/c-variadic/no-closure.stderr
@@ -10,26 +10,14 @@ error: unexpected `...`
 LL |     let f = |...| {};
    |              ^^^ not a valid pattern
    |
-help: for a rest pattern, use `..` instead of `...`
-   |
-LL -     let f = |...| {};
-LL +     let f = |..| {};
-   |
+   = note: C-variadic type `...` is not allowed here
 
 error[E0743]: C-variadic type `...` may not be nested inside another type
-  --> $DIR/no-closure.rs:14:17
+  --> $DIR/no-closure.rs:13:17
    |
 LL |     let f = |_: ...| {};
    |                 ^^^
 
-error: `..` patterns are not allowed here
-  --> $DIR/no-closure.rs:10:14
-   |
-LL |     let f = |...| {};
-   |              ^^^
-   |
-   = note: only allowed in tuple, tuple struct, and slice patterns
-
-error: aborting due to 4 previous errors
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0743`.