From 37459e13fc6118eaf0a01a6dae96908414f02a23 Mon Sep 17 00:00:00 2001 From: Alex Burka Date: Sun, 2 Apr 2017 19:06:40 +0000 Subject: [PATCH] widen :vis follow set --- src/libsyntax/ext/tt/macro_rules.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libsyntax/ext/tt/macro_rules.rs b/src/libsyntax/ext/tt/macro_rules.rs index 84c909284a8f..00623dabec47 100644 --- a/src/libsyntax/ext/tt/macro_rules.rs +++ b/src/libsyntax/ext/tt/macro_rules.rs @@ -795,12 +795,12 @@ fn is_in_follow(tok: "ed::TokenTree, frag: &str) -> Result match *tok { Comma => Ok(true), - ModSep => Ok(true), Ident(i) if i.name != "priv" => Ok(true), - _ => Ok(false) + ref tok => Ok(tok.can_begin_type()) }, - TokenTree::MetaVarDecl(_, _, frag) - if frag.name =="ident" || frag.name == "ty" => Ok(true), + TokenTree::MetaVarDecl(_, _, frag) if frag.name == "ident" + || frag.name == "ty" + || frag.name == "path" => Ok(true), _ => Ok(false) } },