macros: translatable struct attrs and warnings

Signed-off-by: David Wood <david.wood@huawei.com>
This commit is contained in:
David Wood 2022-03-31 08:35:17 +01:00
parent f0de7df204
commit d0fd8d7880
9 changed files with 729 additions and 276 deletions

View file

@ -63,9 +63,14 @@ decl_derive!([TypeFoldable, attributes(type_foldable)] => type_foldable::type_fo
decl_derive!([Lift, attributes(lift)] => lift::lift_derive);
decl_derive!(
[SessionDiagnostic, attributes(
message,
lint,
// struct attributes
warning,
error,
// nested parts of struct attributes
code,
slug,
// field attributes
message,
label,
suggestion,
suggestion_short,