mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Improve handling of trait bounds when deriving fmap-like traits
This commit is contained in:
parent
8101887d31
commit
efc852f6e3
12 changed files with 229 additions and 136 deletions
|
@ -21,7 +21,7 @@ pub fn derive(input: syn::DeriveInput) -> quote::Tokens {
|
|||
let mut expr = if !bindings.is_empty() {
|
||||
let mut expr = quote! {};
|
||||
for binding in bindings {
|
||||
where_clause.add_trait_bound(binding.field.ty.clone());
|
||||
where_clause.add_trait_bound(&binding.field.ty);
|
||||
expr = quote! {
|
||||
#expr
|
||||
writer.item(#binding)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue