mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-14 00:11:00 +00:00
Add partially-working where bounds for associated types
This commit is contained in:
@@ -130,8 +130,9 @@ impl Parameters {
|
||||
fn build_generics(cont: &Container) -> syn::Generics {
|
||||
let generics = bound::without_defaults(cont.generics);
|
||||
|
||||
let trait_bound = parse_quote!(_serde::Serialize);
|
||||
let generics =
|
||||
bound::with_where_predicates_from_fields(cont, &generics, attr::Field::ser_bound);
|
||||
bound::with_where_predicates_from_fields(cont, &generics, &trait_bound, attr::Field::ser_bound, attr::Field::serialize_with);
|
||||
|
||||
match cont.attrs.ser_bound() {
|
||||
Some(predicates) => bound::with_where_predicates(&generics, predicates),
|
||||
@@ -139,7 +140,7 @@ fn build_generics(cont: &Container) -> syn::Generics {
|
||||
cont,
|
||||
&generics,
|
||||
needs_serialize_bound,
|
||||
&parse_quote!(_serde::Serialize),
|
||||
&trait_bound
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user