mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-16 17:03:35 +00:00
Rename c_var_args_without_named_arg to c_var_args_is_sole_param
This commit is contained in:
parent
c6903c04b1
commit
07e0bc9600
@ -339,7 +339,7 @@ impl<'a> AstValidator<'a> {
|
||||
match &*fn_decl.inputs {
|
||||
[Param { ty, span, .. }] => {
|
||||
if let TyKind::CVarArgs = ty.kind {
|
||||
self.session.emit_err(CVarArgsWithoutNamedArg { span: *span });
|
||||
self.session.emit_err(CVarArgsIsSoleParam { span: *span });
|
||||
}
|
||||
}
|
||||
[ps @ .., _] => {
|
||||
|
@ -114,8 +114,8 @@ pub struct TooManyParams {
|
||||
}
|
||||
|
||||
#[derive(SessionDiagnostic)]
|
||||
#[error(ast_passes::c_var_args_without_named_arg)]
|
||||
pub struct CVarArgsWithoutNamedArg {
|
||||
#[error(ast_passes::c_var_args_is_sole_param)]
|
||||
pub struct CVarArgsIsSoleParam {
|
||||
#[primary_span]
|
||||
pub span: Span,
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ ast_passes_forbidden_non_lifetime_param =
|
||||
ast_passes_too_many_params =
|
||||
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
|
||||
|
||||
ast_passes_c_var_args_not_last =
|
||||
|
Loading…
Reference in New Issue
Block a user