+ let ty = match generic {
+ // FIXME: This uses all the generic params of the enum, but the variant might not use all of them.
+ Some(gpl) => {
+ let gpl = gpl.clone_for_update();
+ gpl.generic_params().for_each(|gp| {
+ match gp {
+ ast::GenericParam::LifetimeParam(it) => it.type_bound_list(),
+ ast::GenericParam::TypeParam(it) => it.type_bound_list(),
+ ast::GenericParam::ConstParam(_) => return,
+ }
+ .map(|it| it.remove());
+ });
+ make::ty(&format!("{}<{}>", name.text(), gpl.generic_params().join(", ")))
+ }
+ None => make::ty(&name.text()),
+ };
+ let tuple_field = make::tuple_field(None, ty);