By pass unbind $var while mbe expanding

This commit is contained in:
Edwin Cheng 2019-05-03 23:23:21 +08:00
parent e8e46100d6
commit 31909cc7d7
3 changed files with 39 additions and 7 deletions

View file

@ -952,7 +952,7 @@ macro_rules! foo {
MacroKind::Items,
&rules,
r#"foo!(x,y, 1);"#,
r#"macro_rules ! bar {(bi : ident) => {fn bi () -> u8 {1}}} bar ! (x) ; fn y () -> u8 {1}"#,
r#"macro_rules ! bar {($ bi : ident) => {fn $ bi () -> u8 {1}}} bar ! (x) ; fn y () -> u8 {1}"#,
);
}