Rename c_var_args_without_named_arg to c_var_args_is_sole_param
This commit is contained in:
parent
c6903c04b1
commit
07e0bc9600
3 changed files with 4 additions and 4 deletions
|
@ -339,7 +339,7 @@ impl<'a> AstValidator<'a> {
|
||||||
match &*fn_decl.inputs {
|
match &*fn_decl.inputs {
|
||||||
[Param { ty, span, .. }] => {
|
[Param { ty, span, .. }] => {
|
||||||
if let TyKind::CVarArgs = ty.kind {
|
if let TyKind::CVarArgs = ty.kind {
|
||||||
self.session.emit_err(CVarArgsWithoutNamedArg { span: *span });
|
self.session.emit_err(CVarArgsIsSoleParam { span: *span });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[ps @ .., _] => {
|
[ps @ .., _] => {
|
||||||
|
|
|
@ -114,8 +114,8 @@ pub struct TooManyParams {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(SessionDiagnostic)]
|
#[derive(SessionDiagnostic)]
|
||||||
#[error(ast_passes::c_var_args_without_named_arg)]
|
#[error(ast_passes::c_var_args_is_sole_param)]
|
||||||
pub struct CVarArgsWithoutNamedArg {
|
pub struct CVarArgsIsSoleParam {
|
||||||
#[primary_span]
|
#[primary_span]
|
||||||
pub span: Span,
|
pub span: Span,
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ ast_passes_forbidden_non_lifetime_param =
|
||||||
ast_passes_too_many_params =
|
ast_passes_too_many_params =
|
||||||
function can not have more than {$max_num_args} arguments
|
function can not have more than {$max_num_args} arguments
|
||||||
|
|
||||||
ast_passes_c_var_args_without_named_arg =
|
ast_passes_c_var_args_is_sole_param =
|
||||||
C-variadic function must be declared with at least one named argument
|
C-variadic function must be declared with at least one named argument
|
||||||
|
|
||||||
ast_passes_c_var_args_not_last =
|
ast_passes_c_var_args_not_last =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue