Rust 1.13.0 macro parsing workaround

This commit is contained in:
David Tolnay
2017-04-05 16:22:47 -07:00
parent 3cc14c2a6d
commit 11c89695a1
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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.
+2 -2
View File
@@ -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.
/// ///