-
Notifications
You must be signed in to change notification settings - Fork 111
Conversation
Hi @ia0, are you able to give a quick summary of what this PR is all about and whether it's likely to break anything? |
Hi @KodrAus, |
@@ -85,8 +85,7 @@ macro_rules! impl_error_chain_kind { | |||
queue [ #[$qmeta:meta] $( $tail:tt )*] | |||
) => { | |||
impl_error_chain_kind!(SORT [$( $def )*] | |||
enum [$( $(#[$emeta])* => $eitem $(( $($etyp),* ))* )* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error: unknown macro variable `emeta`
--> src/impl_error_chain_kind.rs:88:26
|
88 | enum [$( $(#[$emeta])* => $eitem $(( $($etyp),* ))* )*
| ^^^^^^
error: unknown macro variable `eitem`
--> src/impl_error_chain_kind.rs:88:39
|
88 | enum [$( $(#[$emeta])* => $eitem $(( $($etyp),* ))* )*
| ^^^^^^
error: unknown macro variable `etyp`
--> src/impl_error_chain_kind.rs:88:52
|
88 | enum [$( $(#[$emeta])* => $eitem $(( $($etyp),* ))* )*
| ^^^^^
Someone familiar with the code should be able to decide how to fix this error:
- Either remove the whole rule because it is never reached (most probable actually).
- Or adapt the right-hand side of the rule such that it does not reference unbound meta-variables (that's what I tried to do).
- Or adapt the left-hand side of the rule such that it binds
$emeta
,$eitem
, and$etyp
.
@@ -103,7 +102,7 @@ macro_rules! impl_error_chain_kind { | |||
) => { | |||
impl_error_chain_kind!(SORT [$( $def )*] | |||
items [$( $(#[$imeta])* => $iitem: $imode [$( $ivar:$ityp ),*] {$( $ifuncs )*} )*] | |||
buf [$( #[$bmeta] )* => $bitem: TUPLE [$( $qvar:$qtyp ),*] ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All following errors are similar to this one, so I'm just providing the output for this error.
error: meta-variable repeats with different Kleene operator
--> src/impl_error_chain_kind.rs:106:55
|
102 | queue [($( $qvar:ident: $qtyp:ty ),+) $( $tail:tt )*]
| - expected repetition
...
106 | buf [$( #[$bmeta] )* => $bitem: TUPLE [$( $qvar:$qtyp ),*] ]
| ^^^^^ - conflicting repetition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation @ia0!
Ok, this looks good to me. While I'm not deeply familiar with these macros I know we've got a pretty reasonable test suite here so will trust it to have caught any regressions that might've come about.
No description provided.