about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorKalita Alexey <kalita.alexey@outlook.com>2016-12-16 14:16:46 +0300
committerKalita Alexey <kalita.alexey@outlook.com>2016-12-16 14:16:46 +0300
commit12a6cf1123890fcc7ee4934422e4d344c5857923 (patch)
tree52a5af91d14170abd3d081c7c50a42231ca06657 /src/libsyntax/parse
parentd250169cb5a96481a3e7c8f9fe05de49f60e5ae5 (diff)
downloadrust-12a6cf1123890fcc7ee4934422e4d344c5857923.tar.gz
rust-12a6cf1123890fcc7ee4934422e4d344c5857923.zip
Allow path fragments to be parsed as type parameter bounds in macro expansion
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs2
1 files changed, 1 insertions, 1 deletions
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