about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-02-20 18:04:57 -0800
committerPatrick Walton <pcwalton@mimiga.net>2013-02-21 08:29:48 -0800
commitc0defda4994b2cf292901c24bef88b37a088861e (patch)
tree07d17e8e78042ffcc42adcb40f80689431bff855 /src/libsyntax/parse/parser.rs
parentbf2a225c0b6f90f61bcaf4a6f33d9eaf424795b6 (diff)
downloadrust-c0defda4994b2cf292901c24bef88b37a088861e.tar.gz
rust-c0defda4994b2cf292901c24bef88b37a088861e.zip
librustc: Separate the rest of the trait bounds with `+` and stop parsing space-separated ones. rs=plussing
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 644d6ed5189..85b4eae25d3 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -75,6 +75,7 @@ use parse::obsolete::{ObsoleteMoveInit, ObsoleteBinaryMove};
 use parse::obsolete::{ObsoleteStructCtor, ObsoleteWith};
 use parse::obsolete::{ObsoleteSyntax, ObsoleteLowerCaseKindBounds};
 use parse::obsolete::{ObsoleteUnsafeBlock, ObsoleteImplSyntax};
+use parse::obsolete::{ObsoleteTraitBoundSeparator};
 use parse::prec::{as_prec, token_to_binop};
 use parse::token::{can_begin_expr, is_ident, is_ident_or_path};
 use parse::token::{is_plain_ident, INTERPOLATED, special_idents};
@@ -2676,7 +2677,12 @@ pub impl Parser {
                 }
 
                 if self.eat(token::BINOP(token::PLUS)) {
-                    // Should be `break;` but that isn't backwards compatible.
+                    loop;
+                }
+
+                if is_ident_or_path(self.token) {
+                    self.obsolete(copy self.span,
+                                  ObsoleteTraitBoundSeparator);
                 }
             }
         }