Partial preparations for upgrading to Rust nightly-2020-05-26

CC https://github.com/servo/servo/issues/26661
Fixes https://github.com/servo/servo/issues/26645
This commit is contained in:
Simon Sapin 2020-05-26 13:01:49 +02:00
parent f3313739f5
commit cfd62cf8dc
3 changed files with 44 additions and 34 deletions

View file

@ -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};
@ -187,6 +187,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),
}
}