mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-07-22 23:05:50 +00:00
Rust 1.13.0 macro parsing workaround
This commit is contained in:
+2
-2
@@ -122,7 +122,7 @@ pub use self::ignored_any::IgnoredAny;
|
|||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
macro_rules! declare_error_trait {
|
macro_rules! declare_error_trait {
|
||||||
(Error: Sized $(+ $supertrait:path)*) => {
|
(Error: Sized $(+ $($supertrait:ident)::*)*) => {
|
||||||
/// The `Error` trait allows `Deserialize` implementations to create descriptive
|
/// The `Error` trait allows `Deserialize` implementations to create descriptive
|
||||||
/// error messages belonging to the `Deserializer` against which they are
|
/// error messages belonging to the `Deserializer` against which they are
|
||||||
/// currently running.
|
/// currently running.
|
||||||
@@ -136,7 +136,7 @@ macro_rules! declare_error_trait {
|
|||||||
///
|
///
|
||||||
/// Most deserializers should only need to provide the `Error::custom` method
|
/// Most deserializers should only need to provide the `Error::custom` method
|
||||||
/// and inherit the default behavior for the other methods.
|
/// and inherit the default behavior for the other methods.
|
||||||
pub trait Error: Sized $(+ $supertrait)* {
|
pub trait Error: Sized $(+ $($supertrait)::*)* {
|
||||||
/// Raised when there is general error when deserializing a type.
|
/// Raised when there is general error when deserializing a type.
|
||||||
///
|
///
|
||||||
/// The message should not be capitalized and should not end with a period.
|
/// The message should not be capitalized and should not end with a period.
|
||||||
|
|||||||
@@ -116,11 +116,11 @@ pub use self::impossible::Impossible;
|
|||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
macro_rules! declare_error_trait {
|
macro_rules! declare_error_trait {
|
||||||
(Error: Sized $(+ $supertrait:path)*) => {
|
(Error: Sized $(+ $($supertrait:ident)::*)*) => {
|
||||||
/// Trait used by `Serialize` implementations to generically construct
|
/// Trait used by `Serialize` implementations to generically construct
|
||||||
/// errors belonging to the `Serializer` against which they are
|
/// errors belonging to the `Serializer` against which they are
|
||||||
/// currently running.
|
/// currently running.
|
||||||
pub trait Error: Sized $(+ $supertrait)* {
|
pub trait Error: Sized $(+ $($supertrait)::*)* {
|
||||||
/// Raised when a `Serialize` implementation encounters a general
|
/// Raised when a `Serialize` implementation encounters a general
|
||||||
/// error while serializing a type.
|
/// error while serializing a type.
|
||||||
///
|
///
|
||||||
|
|||||||
Reference in New Issue
Block a user