diff options
| author | Jakub Beránek <berykubik@gmail.com> | 2025-08-15 12:07:15 +0200 |
|---|---|---|
| committer | Jakub Beránek <berykubik@gmail.com> | 2025-08-15 12:07:15 +0200 |
| commit | 1f3a7471bfb05a5fd76309545de0412d265e28be (patch) | |
| tree | 0bacdf710ee6162de09271321ffac77f2137a92b /compiler/rustc_builtin_macros/messages.ftl | |
| parent | c0839ea7d242f077cec567af1e4489951efb6570 (diff) | |
| download | rust-1f3a7471bfb05a5fd76309545de0412d265e28be.tar.gz rust-1f3a7471bfb05a5fd76309545de0412d265e28be.zip | |
Implement `#[derive(From)]`
Diffstat (limited to 'compiler/rustc_builtin_macros/messages.ftl')
| -rw-r--r-- | compiler/rustc_builtin_macros/messages.ftl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/rustc_builtin_macros/messages.ftl b/compiler/rustc_builtin_macros/messages.ftl index eb3c40cc593..358c0d3db46 100644 --- a/compiler/rustc_builtin_macros/messages.ftl +++ b/compiler/rustc_builtin_macros/messages.ftl @@ -222,6 +222,15 @@ builtin_macros_format_unused_args = multiple unused formatting arguments builtin_macros_format_use_positional = consider using a positional formatting argument instead +builtin_macros_derive_from_wrong_target = `#[derive(From)]` used on {$kind} + +builtin_macros_derive_from_wrong_field_count = `#[derive(From)]` used on a struct with {$multiple_fields -> + [true] multiple fields + *[false] no fields +} + +builtin_macros_derive_from_usage_note = `#[derive(From)]` can only be used on structs with exactly one field + builtin_macros_multiple_default_attrs = multiple `#[default]` attributes .note = only one `#[default]` attribute is needed .label = `#[default]` used here |
