From 5fcc7f69c7a68b08ff223217e8af9f8edb2cc761 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Fri, 12 Apr 2019 16:32:29 +0200 Subject: Capture `Span`s in the AST and thread them through Parsed and Resolved --- dhall_generator/src/quote.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dhall_generator') 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 = 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 = 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); -- cgit v1.2.3