diff options
| author | bors <bors@rust-lang.org> | 2016-12-17 21:49:51 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-12-17 21:49:51 +0000 |
| commit | ec8bb456241ef75f49a22327d5acfa6e1832a9b7 (patch) | |
| tree | f46461d02c2df43a49c66c83bed541103adc2875 /src/libsyntax/parse/parser.rs | |
| parent | 4a008cccaabc8b3fe65ccf5868b9d16319c9ac58 (diff) | |
| parent | 12a6cf1123890fcc7ee4934422e4d344c5857923 (diff) | |
| download | rust-ec8bb456241ef75f49a22327d5acfa6e1832a9b7.tar.gz rust-ec8bb456241ef75f49a22327d5acfa6e1832a9b7.zip | |
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.
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 4367f933485..a1d4ad9d629 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -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 |
