You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
C-variadic function definitions stabilization allows ... without pattern with immediate FCW #160109
In #155697, we stabilized C-variadic function definitions (and C-variadic function declarations in traits).
While reviewing and revising the Reference PR for this, rust-lang/reference#2177, I noticed that we're stabilizing allowance of a behavior that we document as disallowed (with an immediate FCW against it). Prior to the stabilization, we gave a hard error for both of:
That is, we're accepting ... in parameter position without a preceding pattern (with a deny-by-default FCW).
This is a bit unusual for us. Normally we don't stabilize new behavior only to issue an immediately FCW. Presumably we want to ask for this to continue to give a hard error (semantically — this was already accepted in parsing).
cc @folkertdev @rust-lang/lang-docs @rust-lang/lang
For the record I agree that we should just reject bare ... in trait method declarations and definitions (it is still allowed in foreign function declarations), probably just with an error in rustc_ast_passes.
We could also decide to just deny this pre-expansion now. Relevant links
Activity
folkertdev commentedon Jul 29, 2026
For the record I agree that we should just reject bare
...in trait method declarations and definitions (it is still allowed in foreign function declarations), probably just with an error inrustc_ast_passes.We could also decide to just deny this pre-expansion now. Relevant links
c_variadic: Add future-incompatibility warning for...arguments without a pattern outside ofexternblocks #143619varargs_without_patternlint in deps #154599Quoting from that last one
So, the impact is likely extremely low, but it is a breaking change.
Rollup merge of rust-lang#160165 - folkertdev:reject-dotdotdot-post-e…
Rollup merge of rust-lang#160165 - folkertdev:reject-dotdotdot-post-e…
Rollup merge of rust-lang#160165 - folkertdev:reject-dotdotdot-post-e…
Rollup merge of rust-lang#160165 - folkertdev:reject-dotdotdot-post-e…
Rollup merge of rust-lang#160165 - folkertdev:reject-dotdotdot-post-e…
Rollup merge of rust-lang#160165 - folkertdev:reject-dotdotdot-post-e…
Unrolled build for #160165
Rollup merge of #160165 - folkertdev:reject-dotdotdot-post-expansion,…