From 73a4efe984ef52207490d4f18c28eeb055d496c4 Mon Sep 17 00:00:00 2001 From: Marcus Griep <marcus@griep.us> Date: Wed, 21 Feb 2018 10:41:38 -0500 Subject: [PATCH] Change $outname from :tt to :expr It doesn't appear that `:tt` accepts the `stringify!()`-ed value in this position. The :tt is only later used as an `:expr` to produce the name for metadata purposes. Converting this position to be an `:expr` allows the `stringify!()`-ed value and accepts all current uses of the `graphql_scalar!()` macro in this repository. --- juniper/src/macros/scalar.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/juniper/src/macros/scalar.rs b/juniper/src/macros/scalar.rs index 9d055c87..98082b6c 100644 --- a/juniper/src/macros/scalar.rs +++ b/juniper/src/macros/scalar.rs @@ -57,7 +57,7 @@ macro_rules! graphql_scalar { // and body for the from() method on FromInputValue. ( @generate, - ( $name:ty, $outname:tt, $descr:tt ), + ( $name:ty, $outname:expr, $descr:tt ), ( ( $resolve_selfvar:ident, $resolve_body:block ), ( $fiv_arg:ident, $fiv_result:ty, $fiv_body:block ) @@ -135,7 +135,7 @@ macro_rules! graphql_scalar { // description: <description> ( @parse, - ( $name:ty, $outname:tt, $_ignored:tt ), + ( $name:ty, $outname:expr, $_ignored:tt ), $acc:tt, description: $descr:tt $($rest:tt)* ) => {