+//{{{ issue 50903 ==============================================================
+
+macro_rules! foo_50903 {
+ ($($lif:lifetime ,)* #) => {};
+}
+
+foo_50903!('a, 'b, #);
+foo_50903!('a, #);
+foo_50903!(#);
+
+//}}}
+
+//{{{ issue 51477 ==============================================================
+
+macro_rules! foo_51477 {
+ ($lifetime:lifetime) => {
+ "last token is lifetime"
+ };
+ ($other:tt) => {
+ "last token is other"
+ };
+ ($first:tt $($rest:tt)*) => {
+ foo_51477!($($rest)*)
+ };
+}
+
+fn test_51477() {
+ assert_eq!("last token is lifetime", foo_51477!('a));
+ assert_eq!("last token is other", foo_51477!(@));
+ assert_eq!("last token is lifetime", foo_51477!(@ {} 'a));
+}
+
+//}}}
+