We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb364e9 commit 7d52144Copy full SHA for 7d52144
src/libsyntax/ext/tt/macro_rules.rs
@@ -291,17 +291,16 @@ pub fn compile<'cx>(cx: &'cx mut ExtCtxt,
291
let lhses = match **argument_map.get(&lhs_nm.name).unwrap() {
292
MatchedSeq(ref s, _) => {
293
s.iter().map(|m| match **m {
294
- MatchedNonterminal(NtTT(ref tt)) => (**tt).clone(),
+ MatchedNonterminal(NtTT(ref tt)) => {
295
+ valid &= check_lhs_nt_follows(cx, tt);
296
+ (**tt).clone()
297
+ }
298
_ => cx.span_bug(def.span, "wrong-structured lhs")
299
}).collect()
300
}
301
302
};
303
- for lhs in &lhses {
- valid &= check_lhs_nt_follows(cx, lhs);
- }
304
-
305
let rhses = match **argument_map.get(&rhs_nm.name).unwrap() {
306
307
0 commit comments