about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEsteban Küber <esteban@osdyne.com>2025-09-16 11:24:51 -0700
committerEsteban Küber <esteban@osdyne.com>2025-09-16 11:24:51 -0700
commit8306a2f02e6c56447ff05b19b4b73c5c861e34fd (patch)
tree828a01b04c67502553ddd9115784a76b94ab9b8e
parented85f9846da9abfad09bb5732bc18d6c39fbc9f9 (diff)
downloadrust-8306a2f02e6c56447ff05b19b4b73c5c861e34fd.tar.gz
rust-8306a2f02e6c56447ff05b19b4b73c5c861e34fd.zip
Reword note
-rw-r--r--compiler/rustc_parse/messages.ftl2
-rw-r--r--tests/ui/c-variadic/no-closure.stderr2
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_parse/messages.ftl b/compiler/rustc_parse/messages.ftl
index 6d9521c7d2b..3a4c9348b32 100644
--- a/compiler/rustc_parse/messages.ftl
+++ b/compiler/rustc_parse/messages.ftl
@@ -189,7 +189,7 @@ parse_dotdotdot = unexpected token: `...`
 parse_dotdotdot_rest_pattern = unexpected `...`
     .label = not a valid pattern
     .suggestion = for a rest pattern, use `..` instead of `...`
-    .note = C-variadic type `...` is not allowed here
+    .note = only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
 
 parse_double_colon_in_bound = expected `:` followed by trait or lifetime
     .suggestion = use single colon
diff --git a/tests/ui/c-variadic/no-closure.stderr b/tests/ui/c-variadic/no-closure.stderr
index ad635a29ab4..4b553c21597 100644
--- a/tests/ui/c-variadic/no-closure.stderr
+++ b/tests/ui/c-variadic/no-closure.stderr
@@ -10,7 +10,7 @@ error: unexpected `...`
 LL |     let f = |...| {};
    |              ^^^ not a valid pattern
    |
-   = note: C-variadic type `...` is not allowed here
+   = note: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
 
 error[E0743]: C-variadic type `...` may not be nested inside another type
   --> $DIR/no-closure.rs:13:17