From 12a6cf1123890fcc7ee4934422e4d344c5857923 Mon Sep 17 00:00:00 2001 From: Kalita Alexey Date: Fri, 16 Dec 2016 14:16:46 +0300 Subject: Allow path fragments to be parsed as type parameter bounds in macro expansion --- src/libsyntax/parse/parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libsyntax') diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index bdd1606805f..8ea59a5cbab 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -4173,7 +4173,7 @@ impl<'a> Parser<'a> { })); self.bump(); } - token::ModSep | token::Ident(..) => { + _ if self.token.is_path_start() || self.token.is_keyword(keywords::For) => { let poly_trait_ref = self.parse_poly_trait_ref()?; let modifier = if ate_question { TraitBoundModifier::Maybe -- cgit 1.4.1-3-g733a5