diff options
Diffstat (limited to 'dhall_generator')
-rw-r--r-- | dhall_generator/src/dhall_expr.rs | 3 | ||||
-rw-r--r-- | dhall_generator/src/dhall_type.rs | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/dhall_generator/src/dhall_expr.rs b/dhall_generator/src/dhall_expr.rs index bc9da22..41e558b 100644 --- a/dhall_generator/src/dhall_expr.rs +++ b/dhall_generator/src/dhall_expr.rs @@ -109,7 +109,8 @@ fn dhall_to_tokenstream_bx( // Non-free variable; interpolates as itself Some(()) => { let s: String = s.into(); - quote! { dhall_core::bx(dhall_core::Expr::Var(dhall_core::V(#s.into(), #n))) } + let var = quote! { dhall_core::V(#s.into(), #n) }; + bx(quote! { dhall_core::Expr::Var(#var) }) } // Free variable; interpolates as a rust variable None => { diff --git a/dhall_generator/src/dhall_type.rs b/dhall_generator/src/dhall_type.rs index 329cd79..42549bb 100644 --- a/dhall_generator/src/dhall_type.rs +++ b/dhall_generator/src/dhall_type.rs @@ -175,7 +175,8 @@ pub fn derive_dhall_type_inner( let ident = &input.ident; let tokens = quote! { - impl #impl_generics dhall::DhallType for #ident #ty_generics #where_clause { + impl #impl_generics dhall::DhallType for #ident #ty_generics + #where_clause { fn dhall_type() -> dhall_core::DhallExpr { #(#assertions)* #dhall_type |