Allow path fragments to be parsed as type parameter bounds in macro expansion

This commit is contained in:
Kalita Alexey 2016-12-16 14:16:46 +03:00
parent d250169cb5
commit 12a6cf1123
4 changed files with 65 additions and 1 deletions

View file

@ -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