about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index b56919c53c7..043ce3bf5b0 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -1658,6 +1658,12 @@ impl<'a> Parser<'a> {
             let bounds = {
                 if self.eat(&token::BINOP(token::PLUS)) {
                     let (_, bounds) = self.parse_ty_param_bounds(false);
+                    if bounds.len() == 0 {
+                        let last_span = self.last_span;
+                        self.span_err(last_span,
+                                      "at least one type parameter bound \
+                                       must be specified after the `+`");
+                    }
                     Some(bounds)
                 } else {
                     None