diff options
| author | Folkert de Vries <folkert@folkertdev.nl> | 2024-09-05 13:45:26 +0200 |
|---|---|---|
| committer | Folkert de Vries <folkert@folkertdev.nl> | 2024-10-06 18:12:25 +0200 |
| commit | 562ec5a6fb469a360b72aa8ba0ce149598cc7975 (patch) | |
| tree | ef26a0c513a413e9a7994389cdfd5796e5a69b68 /compiler/rustc_passes/messages.ftl | |
| parent | 1a9c1cbf367fb2b6f04a0a81d7fae56485e29e7f (diff) | |
| download | rust-562ec5a6fb469a360b72aa8ba0ce149598cc7975.tar.gz rust-562ec5a6fb469a360b72aa8ba0ce149598cc7975.zip | |
disallow `asm!` in `#[naked]` functions
also disallow the `noreturn` option, and infer `naked_asm!` as `!`
Diffstat (limited to 'compiler/rustc_passes/messages.ftl')
| -rw-r--r-- | compiler/rustc_passes/messages.ftl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_passes/messages.ftl b/compiler/rustc_passes/messages.ftl index f2682acf8aa..1b1d1b1fb72 100644 --- a/compiler/rustc_passes/messages.ftl +++ b/compiler/rustc_passes/messages.ftl @@ -488,9 +488,9 @@ passes_naked_asm_outside_naked_fn = the `naked_asm!` macro can only be used in functions marked with `#[naked]` passes_naked_functions_asm_block = - naked functions must contain a single asm block - .label_multiple_asm = multiple asm blocks are unsupported in naked functions - .label_non_asm = non-asm is unsupported in naked functions + naked functions must contain a single `naked_asm!` invocation + .label_multiple_asm = multiple `naked_asm!` invocations are not allowed in naked functions + .label_non_asm = not allowed in naked functions passes_naked_functions_asm_options = asm options unsupported in naked functions: {$unsupported_options} @@ -500,9 +500,9 @@ passes_naked_functions_incompatible_attribute = .label = the `{$attr}` attribute is incompatible with `#[naked]` .naked_attribute = function marked with `#[naked]` here -passes_naked_functions_must_use_noreturn = - asm in naked functions must use `noreturn` option - .suggestion = consider specifying that the asm block is responsible for returning from the function +passes_naked_functions_must_naked_asm = + the `asm!` macro is not allowed in naked functions + .suggestion = consider using the `naked_asm!` macro instead passes_naked_functions_operands = only `const` and `sym` operands are supported in naked functions |
