diff options
| author | George Bateman <george.bateman16@gmail.com> | 2024-01-02 23:13:08 +0000 |
|---|---|---|
| committer | George Bateman <george.bateman16@gmail.com> | 2024-01-02 23:13:08 +0000 |
| commit | f0c0a498b86313468f20f0aa42ffc4fc685cacd2 (patch) | |
| tree | 16eaac31fa78ce12af17b0ed2e7f9a17e5b7caf4 /compiler/rustc_parse/src/parser/expr.rs | |
| parent | 09bb07e38f5bfba4fa3e9ac3113e6b7e542e7c67 (diff) | |
| download | rust-f0c0a498b86313468f20f0aa42ffc4fc685cacd2.tar.gz rust-f0c0a498b86313468f20f0aa42ffc4fc685cacd2.zip | |
Update after rebase
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index 739d7384fda..0b24e784126 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -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 { @@ -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; } } @@ -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()) } |
