about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEsteban Küber <esteban@osdyne.com>2025-09-15 03:10:27 -0700
committerEsteban Küber <esteban@osdyne.com>2025-09-15 03:10:27 -0700
commita84c8deb1f61e020e026e1fa53bc613426da8fdb (patch)
tree1dcb5891671ad8996bf94e3f383fd3f6dc356ea3
parent0e290e4228e90720b4b3e263f95250db7046cdd2 (diff)
downloadrust-a84c8deb1f61e020e026e1fa53bc613426da8fdb.tar.gz
rust-a84c8deb1f61e020e026e1fa53bc613426da8fdb.zip
Fix existing test
-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`.