提交 48757a70 编写于 作者: J John Kåre Alsaker

Fix newtype_index

上级 7c19e1ee
......@@ -286,13 +286,15 @@ fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
);
// Append comma to end of derives list if it's missing
(@type [$type:ident]
(@attrs [$(#[$attrs:meta])*]
@type [$type:ident]
@max [$max:expr]
@vis [$v:vis]
@debug_format [$debug_format:tt]
derive [$($derives:ident),*]
$($tokens:tt)*) => (
newtype_index!(
@attrs [$(#[$attrs])*]
@type [$type]
@max [$max]
@vis [$v]
......@@ -303,7 +305,8 @@ fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
// By not including the @derives marker in this list nor in the default args, we can force it
// to come first if it exists. When encodable is custom, just use the derives list as-is.
(@type [$type:ident]
(@attrs [$(#[$attrs:meta])*]
@type [$type:ident]
@max [$max:expr]
@vis [$v:vis]
@debug_format [$debug_format:tt]
......@@ -311,6 +314,7 @@ fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
ENCODABLE = custom
$($tokens:tt)*) => (
newtype_index!(
@attrs [$(#[$attrs])*]
@derives [$($derives,)+]
@type [$type]
@max [$max]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册