Auto merge of #38279 - KalitaAlexey:issue-8521, r=jseyfried

macros: allow a `path` fragment to be parsed as a type parameter bound

Allow a `path` fragment to be parsed as a type parameter bound.
Fixes #8521.
This commit is contained in:
bors 2016-12-17 21:49:51 +00:00
commit ec8bb45624
4 changed files with 65 additions and 1 deletions

View file

@ -4174,7 +4174,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