From d9b4bd8d4019ca9ab999c0c4657663604158101c Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sat, 6 Apr 2019 17:50:47 +0200 Subject: s/Type/StaticType/ --- dhall_generator/src/dhall_type.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'dhall_generator/src/dhall_type.rs') diff --git a/dhall_generator/src/dhall_type.rs b/dhall_generator/src/dhall_type.rs index 3b1d1c9..38c871d 100644 --- a/dhall_generator/src/dhall_type.rs +++ b/dhall_generator/src/dhall_type.rs @@ -44,7 +44,7 @@ pub fn derive_for_struct( .map(|(name, ty)| { let name = dhall_core::Label::from(name); constraints.push(ty.clone()); - (name, quote!(<#ty as dhall::Type>::get_type())) + (name, quote!(<#ty as dhall::StaticType>::get_type())) }) .collect(); let record = @@ -88,7 +88,7 @@ pub fn derive_for_enum( }; let ty = ty?; constraints.push(ty.clone()); - Ok((name, quote!(<#ty as dhall::Type>::get_type()))) + Ok((name, quote!(<#ty as dhall::StaticType>::get_type()))) }) .collect::>()?; @@ -136,7 +136,7 @@ pub fn derive_type_inner( let mut local_where_clause = orig_where_clause.clone(); local_where_clause .predicates - .push(parse_quote!(#ty: dhall::Type)); + .push(parse_quote!(#ty: dhall::StaticType)); let phantoms = generics.params.iter().map(|param| match param { syn::GenericParam::Type(syn::TypeParam { ident, .. }) => { quote!(#ident) @@ -156,12 +156,12 @@ pub fn derive_type_inner( // Ensure that all the fields have a Type impl let mut where_clause = orig_where_clause.clone(); for ty in constraints.iter() { - where_clause.predicates.push(parse_quote!(#ty: dhall::Type)); + where_clause.predicates.push(parse_quote!(#ty: dhall::StaticType)); } let ident = &input.ident; let tokens = quote! { - impl #impl_generics dhall::Type for #ident #ty_generics + impl #impl_generics dhall::StaticType for #ident #ty_generics #where_clause { fn get_type() -> dhall_core::DhallExpr { #(#assertions)* -- cgit v1.2.3