mirror of
https://codeberg.org/kiss-community/repo
synced 2025-02-28 01:26:27 -07:00
40 lines
1.6 KiB
Diff
40 lines
1.6 KiB
Diff
From 63678ae69e03325d65255d29f1af4a6ea3dd354a Mon Sep 17 00:00:00 2001
|
|
From: Thomas Deutschmann <whissi@gentoo.org>
|
|
Date: Sat, 10 Oct 2020 16:07:49 +0200
|
|
Subject: [PATCH 36/38] bmo#1643201: Cherry-pick some servo changes to
|
|
derive_common
|
|
|
|
Link: https://bugzilla.mozilla.org/show_bug.cgi?id=1663715#c7
|
|
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
---
|
|
servo/components/derive_common/cg.rs | 6 +++++-
|
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/servo/components/derive_common/cg.rs b/servo/components/derive_common/cg.rs
|
|
index 55a75398c7..c51c0d7750 100644
|
|
--- a/servo/components/derive_common/cg.rs
|
|
+++ b/servo/components/derive_common/cg.rs
|
|
@@ -7,7 +7,7 @@ use proc_macro2::{Span, TokenStream};
|
|
use quote::TokenStreamExt;
|
|
use syn::{self, AngleBracketedGenericArguments, Binding, DeriveInput, Field};
|
|
use syn::{GenericArgument, GenericParam, Ident, Path};
|
|
-use syn::{PathArguments, PathSegment, QSelf, Type, TypeArray};
|
|
+use syn::{PathArguments, PathSegment, QSelf, Type, TypeArray, TypeGroup};
|
|
use syn::{TypeParam, TypeParen, TypePath, TypeSlice, TypeTuple};
|
|
use syn::{Variant, WherePredicate};
|
|
use synstructure::{self, BindStyle, BindingInfo, VariantAst, VariantInfo};
|
|
@@ -208,6 +208,10 @@ where
|
|
elem: Box::new(map_type_params(&inner.elem, params, f)),
|
|
..inner.clone()
|
|
}),
|
|
+ Type::Group(ref inner) => Type::from(TypeGroup {
|
|
+ elem: Box::new(map_type_params(&inner.elem, params, f)),
|
|
+ ..inner.clone()
|
|
+ }),
|
|
ref ty => panic!("type {:?} cannot be mapped yet", ty),
|
|
}
|
|
}
|
|
--
|
|
2.28.0
|
|
|