about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorArtem Chernyak <artemchernyak@gmail.com>2017-04-28 22:44:34 -0500
committerGitHub <noreply@github.com>2017-04-28 22:44:34 -0500
commit2f73b173cbe6e6635226593a2bc6672faf61bd60 (patch)
treefd55a6bed0b70db92af5a26ff1eae35458c8ef83 /src/libsyntax/parse/parser.rs
parentba90718bb44fe7e2a5edbcc3e5503ee1f7feebd5 (diff)
parent810ed98d08158574e98b504c0955fce6c6a72ad9 (diff)
downloadrust-2f73b173cbe6e6635226593a2bc6672faf61bd60.tar.gz
rust-2f73b173cbe6e6635226593a2bc6672faf61bd60.zip
Merge branch 'master' into def_span
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index cba77335143..84d53dbef7c 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -1453,9 +1453,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());