diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2017-02-22 23:59:40 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2017-04-25 23:58:05 +0300 |
| commit | d349e87d61745d402f6e38727beb62a6525a2153 (patch) | |
| tree | 58b6b7ee7928ee053d2b35ba83afe3cb277dbad4 /src/libsyntax/parse/parser.rs | |
| parent | 2b4c911581099e247a68b3a8adc782d778f5190b (diff) | |
| download | rust-d349e87d61745d402f6e38727beb62a6525a2153.tar.gz rust-d349e87d61745d402f6e38727beb62a6525a2153.zip | |
Parse trait object types starting with a lifetime bound
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 1baf0d1b54c..c7f4512301c 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1451,9 +1451,9 @@ impl<'a> Parser<'a> { } else if self.eat_keyword(keywords::Impl) { // FIXME: figure out priority of `+` in `impl Trait1 + Trait2` (#34511). TyKind::ImplTrait(self.parse_ty_param_bounds()?) - } else if self.check(&token::Question) { + } else if self.check(&token::Question) || + self.check_lifetime() && self.look_ahead(1, |t| t == &token::BinOp(token::Plus)){ // Bound list (trait object type) - // Bound lists starting with `'lt` are not currently supported (#40043) TyKind::TraitObject(self.parse_ty_param_bounds_common(allow_plus)?) } else { let msg = format!("expected type, found {}", self.this_token_descr()); |
