1
Fork 0

Use more appropriate spans on object unsafe traits and provide structured suggestions when possible

This commit is contained in:
Esteban Küber 2020-01-31 18:48:35 -08:00
parent 413bfa4b98
commit a52ec87a17
22 changed files with 178 additions and 62 deletions

View file

@ -172,7 +172,7 @@ impl<'a> Parser<'a> {
/// ```
pub(super) fn parse_where_clause(&mut self) -> PResult<'a, WhereClause> {
let mut where_clause =
WhereClause { predicates: Vec::new(), span: self.prev_span.to(self.prev_span) };
WhereClause { predicates: Vec::new(), span: self.prev_span.shrink_to_hi() };
if !self.eat_keyword(kw::Where) {
return Ok(where_clause);