Skip to content

Commit 07e0bc9

Browse files
committed
Rename c_var_args_without_named_arg to c_var_args_is_sole_param
1 parent c6903c0 commit 07e0bc9

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

compiler/rustc_ast_passes/src/ast_validation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ impl<'a> AstValidator<'a> {
339339
match &*fn_decl.inputs {
340340
[Param { ty, span, .. }] => {
341341
if let TyKind::CVarArgs = ty.kind {
342-
self.session.emit_err(CVarArgsWithoutNamedArg { span: *span });
342+
self.session.emit_err(CVarArgsIsSoleParam { span: *span });
343343
}
344344
}
345345
[ps @ .., _] => {

compiler/rustc_ast_passes/src/errors.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ pub struct TooManyParams {
114114
}
115115

116116
#[derive(SessionDiagnostic)]
117-
#[error(ast_passes::c_var_args_without_named_arg)]
118-
pub struct CVarArgsWithoutNamedArg {
117+
#[error(ast_passes::c_var_args_is_sole_param)]
118+
pub struct CVarArgsIsSoleParam {
119119
#[primary_span]
120120
pub span: Span,
121121
}

compiler/rustc_error_messages/locales/en-US/ast_passes.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ ast_passes_forbidden_non_lifetime_param =
4141
ast_passes_too_many_params =
4242
function can not have more than {$max_num_args} arguments
4343
44-
ast_passes_c_var_args_without_named_arg =
44+
ast_passes_c_var_args_is_sole_param =
4545
C-variadic function must be declared with at least one named argument
4646
4747
ast_passes_c_var_args_not_last =

0 commit comments

Comments
 (0)