about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorNick Cameron <ncameron@mozilla.com>2015-04-22 18:29:54 +1200
committerNick Cameron <ncameron@mozilla.com>2015-04-22 18:29:54 +1200
commit8456dba4e65456cd7817864f23c8787c0494ab23 (patch)
tree3340ea4ecb6f475bc45a45b0eaba8f2944e62099 /src/libsyntax/parse
parent5910dc0e8e396a4af7b948b83bab03f27b414a0e (diff)
downloadrust-8456dba4e65456cd7817864f23c8787c0494ab23.tar.gz
rust-8456dba4e65456cd7817864f23c8787c0494ab23.zip
Fix spans for predicates in where clauses
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 0515d1ae945..d9a560b0eac 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -3882,7 +3882,7 @@ impl<'a> Parser<'a> {
                     let bounds =
                         try!(self.parse_lifetimes(token::BinOp(token::Plus)));
 
-                    let hi = self.span.hi;
+                    let hi = self.last_span.hi;
                     let span = mk_sp(lo, hi);
 
                     where_clause.predicates.push(ast::WherePredicate::RegionPredicate(
@@ -3911,7 +3911,7 @@ impl<'a> Parser<'a> {
 
                     if try!(self.eat(&token::Colon) ){
                         let bounds = try!(self.parse_ty_param_bounds(BoundParsingMode::Bare));
-                        let hi = self.span.hi;
+                        let hi = self.last_span.hi;
                         let span = mk_sp(lo, hi);
 
                         if bounds.is_empty() {
@@ -3931,7 +3931,7 @@ impl<'a> Parser<'a> {
                         parsed_something = true;
                     } else if try!(self.eat(&token::Eq) ){
                         // let ty = try!(self.parse_ty_nopanic());
-                        let hi = self.span.hi;
+                        let hi = self.last_span.hi;
                         let span = mk_sp(lo, hi);
                         // where_clause.predicates.push(
                         //     ast::WherePredicate::EqPredicate(ast::WhereEqPredicate {