Skip to content

Commit

Permalink
Update after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
GKFX committed Jan 2, 2024
1 parent 09bb07e commit f0c0a49
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions compiler/rustc_parse/src/parser/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,7 @@ impl<'a> Parser<'a> {
// Parse this both to give helpful error messages and to
// verify it can be done with this parser setup.
ExprKind::Index(ref left, ref _right, span) => {
self.sess.emit_err(errors::ArrayIndexInOffsetOf(span));
self.dcx().emit_err(errors::ArrayIndexInOffsetOf(span));
current = left;
}
ExprKind::Lit(token::Lit {
Expand Down Expand Up @@ -1216,14 +1216,14 @@ impl<'a> Parser<'a> {
fields.insert(start_idx, *ident)
}
_ => {
self.sess.emit_err(errors::InvalidOffsetOf(current.span));
self.dcx().emit_err(errors::InvalidOffsetOf(current.span));
break;
}
}
break;
}
_ => {
self.sess.emit_err(errors::InvalidOffsetOf(current.span));
self.dcx().emit_err(errors::InvalidOffsetOf(current.span));
break;
}
}
Expand All @@ -1233,12 +1233,12 @@ impl<'a> Parser<'a> {
break;
} else if trailing_dot.is_none() {
// This loop should only repeat if there is a trailing dot.
self.sess.emit_err(errors::InvalidOffsetOf(self.token.span));
self.dcx().emit_err(errors::InvalidOffsetOf(self.token.span));
break;
}
}
if let Some(dot) = trailing_dot {
self.sess.emit_err(errors::InvalidOffsetOf(dot));
self.dcx().emit_err(errors::InvalidOffsetOf(dot));
}
Ok(fields.into_iter().collect())
}
Expand Down

0 comments on commit f0c0a49

Please sign in to comment.