Skip to content

Commit 99b3893

Browse files
committed
Add temporary workaround for stor impl trait usages.
1 parent 3c1528d commit 99b3893

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ keyed = []
1717
[dependencies]
1818
repository-macros = {version = "0.1.0", path = "repository-macros"}
1919
elsa = "1.7.0"
20-
indexmap = "1.9.1"
20+
indexmap = {version = "1.9.1", features = ["std"]}
2121

2222
[workspace]
2323
members = ["repository-macros"]

repository-macros/src/adt.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1514,7 +1514,14 @@ impl AdtVariantDefinition {
15141514
let stor_args_tys = Self::prepare_adt_initializer_tokens(
15151515
variant_stor_param_list.into_iter(),
15161516
false,
1517-
|_, param_type| quote!(#param_type,),
1517+
|_, param_type| {
1518+
// FIXME: temporary workaround for current language limitation
1519+
if matches!(param_type, syn::Type::ImplTrait(..)) {
1520+
quote!(_,)
1521+
} else {
1522+
quote!(#param_type,)
1523+
}
1524+
},
15181525
);
15191526
quote! {
15201527
#[allow(non_snake_case)]

0 commit comments

Comments
 (0)