Fix spans for predicates in where clauses
This commit is contained in:
parent
5910dc0e8e
commit
8456dba4e6
1 changed files with 3 additions and 3 deletions
|
@ -3882,7 +3882,7 @@ impl<'a> Parser<'a> {
|
||||||
let bounds =
|
let bounds =
|
||||||
try!(self.parse_lifetimes(token::BinOp(token::Plus)));
|
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);
|
let span = mk_sp(lo, hi);
|
||||||
|
|
||||||
where_clause.predicates.push(ast::WherePredicate::RegionPredicate(
|
where_clause.predicates.push(ast::WherePredicate::RegionPredicate(
|
||||||
|
@ -3911,7 +3911,7 @@ impl<'a> Parser<'a> {
|
||||||
|
|
||||||
if try!(self.eat(&token::Colon) ){
|
if try!(self.eat(&token::Colon) ){
|
||||||
let bounds = try!(self.parse_ty_param_bounds(BoundParsingMode::Bare));
|
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);
|
let span = mk_sp(lo, hi);
|
||||||
|
|
||||||
if bounds.is_empty() {
|
if bounds.is_empty() {
|
||||||
|
@ -3931,7 +3931,7 @@ impl<'a> Parser<'a> {
|
||||||
parsed_something = true;
|
parsed_something = true;
|
||||||
} else if try!(self.eat(&token::Eq) ){
|
} else if try!(self.eat(&token::Eq) ){
|
||||||
// let ty = try!(self.parse_ty_nopanic());
|
// let ty = try!(self.parse_ty_nopanic());
|
||||||
let hi = self.span.hi;
|
let hi = self.last_span.hi;
|
||||||
let span = mk_sp(lo, hi);
|
let span = mk_sp(lo, hi);
|
||||||
// where_clause.predicates.push(
|
// where_clause.predicates.push(
|
||||||
// ast::WherePredicate::EqPredicate(ast::WhereEqPredicate {
|
// ast::WherePredicate::EqPredicate(ast::WhereEqPredicate {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue