1
Fork 0

Migrate some rustc_builtin_macros to SessionDiagnostic

Signed-off-by: he1pa <18012015693@163.com>
This commit is contained in:
he1pa 2024-06-25 18:04:21 +08:00
parent 3d5d7a24f7
commit a82f70eeee
5 changed files with 76 additions and 23 deletions

View file

@ -17,6 +17,9 @@ builtin_macros_asm_expected_other = expected operand, {$is_global_asm ->
*[false] clobber_abi, options
}, or additional template string
builtin_macros_asm_expected_string_literal = expected string literal
.label = not a string literal
builtin_macros_asm_explicit_register_name = explicit register arguments cannot have names
builtin_macros_asm_mayunwind = asm labels are not allowed with the `may_unwind` option
@ -25,6 +28,8 @@ builtin_macros_asm_modifier_invalid = asm template modifier must be a single cha
builtin_macros_asm_mutually_exclusive = the `{$opt1}` and `{$opt2}` options are mutually exclusive
builtin_macros_asm_no_matched_argument_name = there is no argument named `{$name}`
builtin_macros_asm_noreturn = asm outputs are not allowed with the `noreturn` option
builtin_macros_asm_opt_already_provided = the `{$symbol}` option was already provided
@ -228,10 +233,16 @@ builtin_macros_only_one_argument = {$name} takes 1 argument
builtin_macros_proc_macro = `proc-macro` crate types currently cannot export any items other than functions tagged with `#[proc_macro]`, `#[proc_macro_derive]`, or `#[proc_macro_attribute]`
builtin_macros_proc_macro_attribute_only_be_used_on_bare_functions = the `#[{$path}]` attribute may only be used on bare functions
builtin_macros_proc_macro_attribute_only_usable_with_crate_type = the `#[{$path}]` attribute is only usable with crates of the `proc-macro` crate type
builtin_macros_requires_cfg_pattern =
macro requires a cfg-pattern as an argument
.label = cfg-pattern required
builtin_macros_source_uitls_expected_item = expected item, found `{$token}`
builtin_macros_takes_no_arguments = {$name} takes no arguments
builtin_macros_test_bad_fn = {$kind} functions cannot be used for tests