diff options
| author | finalchild <finalchild2@gmail.com> | 2022-08-18 17:53:59 +0900 |
|---|---|---|
| committer | finalchild <finalchild2@gmail.com> | 2022-08-22 00:57:22 +0900 |
| commit | 07e0bc9600128aef1922cd67939c303d92b3fafc (patch) | |
| tree | 0df5f1cdeb17404f12434c43698efc237132a871 | |
| parent | c6903c04b1c95061680aafa9da7e8dbccabb9069 (diff) | |
| download | rust-07e0bc9600128aef1922cd67939c303d92b3fafc.tar.gz rust-07e0bc9600128aef1922cd67939c303d92b3fafc.zip | |
Rename c_var_args_without_named_arg to c_var_args_is_sole_param
| -rw-r--r-- | compiler/rustc_ast_passes/src/ast_validation.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_ast_passes/src/errors.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_error_messages/locales/en-US/ast_passes.ftl | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_ast_passes/src/ast_validation.rs b/compiler/rustc_ast_passes/src/ast_validation.rs index e42d716d5ae..3dd3cc537e6 100644 --- a/compiler/rustc_ast_passes/src/ast_validation.rs +++ b/compiler/rustc_ast_passes/src/ast_validation.rs @@ -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 @ .., _] => { diff --git a/compiler/rustc_ast_passes/src/errors.rs b/compiler/rustc_ast_passes/src/errors.rs index 2b6d3d2a39a..d376f638bd2 100644 --- a/compiler/rustc_ast_passes/src/errors.rs +++ b/compiler/rustc_ast_passes/src/errors.rs @@ -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, } diff --git a/compiler/rustc_error_messages/locales/en-US/ast_passes.ftl b/compiler/rustc_error_messages/locales/en-US/ast_passes.ftl index bca73baea00..49ef0cc83de 100644 --- a/compiler/rustc_error_messages/locales/en-US/ast_passes.ftl +++ b/compiler/rustc_error_messages/locales/en-US/ast_passes.ftl @@ -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 = |
