summaryrefslogtreecommitdiff
path: root/dhall_generator/src
diff options
context:
space:
mode:
authorNadrieril2019-04-12 16:33:49 +0200
committerNadrieril2019-04-12 16:33:49 +0200
commit35e19e0f7c3dcfcd4203a3aaaa73d6f26db276f5 (patch)
treeda5c9d6e936ba97d7ccadc213ea2c5a197ebe15b /dhall_generator/src
parent7ba857a96eebbdd1cef0aa22407c870887d24aed (diff)
parent5fcc7f69c7a68b08ff223217e8af9f8edb2cc761 (diff)
Merge branch 'lifetimes'
Closes #55
Diffstat (limited to '')
-rw-r--r--dhall_generator/src/derive.rs3
-rw-r--r--dhall_generator/src/quote.rs4
2 files changed, 4 insertions, 3 deletions
diff --git a/dhall_generator/src/derive.rs b/dhall_generator/src/derive.rs
index c911be5..e231702 100644
--- a/dhall_generator/src/derive.rs
+++ b/dhall_generator/src/derive.rs
@@ -176,7 +176,8 @@ pub fn derive_simple_static_type_inner(
let tokens = quote! {
impl #impl_generics dhall::SimpleStaticType for #ident #ty_generics
#where_clause {
- fn get_simple_static_type() -> dhall::expr::SimpleType {
+ fn get_simple_static_type<'get_simple_static_type>() ->
+ dhall::expr::SimpleType<'get_simple_static_type> {
#(#assertions)*
dhall::expr::SimpleType::from(#get_type)
}
diff --git a/dhall_generator/src/quote.rs b/dhall_generator/src/quote.rs
index 8552def..2d2eada 100644
--- a/dhall_generator/src/quote.rs
+++ b/dhall_generator/src/quote.rs
@@ -7,7 +7,7 @@ use std::collections::BTreeMap;
pub fn expr(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
let input_str = input.to_string();
- let expr: SubExpr<X, Import> = parse_expr(&input_str).unwrap();
+ let expr: SubExpr<_, Import> = parse_expr(&input_str).unwrap().unnote();
let no_import =
|_: &Import| -> X { panic!("Don't use import in dhall::expr!()") };
let expr = expr.as_ref().map_embed(&no_import);
@@ -17,7 +17,7 @@ pub fn expr(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
pub fn subexpr(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
let input_str = input.to_string();
- let expr: SubExpr<X, Import> = parse_expr(&input_str).unwrap();
+ let expr: SubExpr<_, Import> = parse_expr(&input_str).unwrap().unnote();
let no_import =
|_: &Import| -> X { panic!("Don't use import in dhall::subexpr!()") };
let expr = expr.as_ref().map_embed(&no_import);