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.
This commit is contained in:
Marcus Griep 2018-02-21 10:41:38 -05:00 committed by theduke
parent 875c80748d
commit 73a4efe984

View file

@ -57,7 +57,7 @@ macro_rules! graphql_scalar {
// and body for the from() method on FromInputValue. // and body for the from() method on FromInputValue.
( (
@generate, @generate,
( $name:ty, $outname:tt, $descr:tt ), ( $name:ty, $outname:expr, $descr:tt ),
( (
( $resolve_selfvar:ident, $resolve_body:block ), ( $resolve_selfvar:ident, $resolve_body:block ),
( $fiv_arg:ident, $fiv_result:ty, $fiv_body:block ) ( $fiv_arg:ident, $fiv_result:ty, $fiv_body:block )
@ -135,7 +135,7 @@ macro_rules! graphql_scalar {
// description: <description> // description: <description>
( (
@parse, @parse,
( $name:ty, $outname:tt, $_ignored:tt ), ( $name:ty, $outname:expr, $_ignored:tt ),
$acc:tt, $acc:tt,
description: $descr:tt $($rest:tt)* description: $descr:tt $($rest:tt)*
) => { ) => {