Skip to content

Commit f0c0a49

Browse files
committed
Update after rebase
1 parent 09bb07e commit f0c0a49

File tree

1 file changed

+5
-5
lines changed
  • compiler/rustc_parse/src/parser

1 file changed

+5
-5
lines changed

compiler/rustc_parse/src/parser/expr.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1167,7 +1167,7 @@ impl<'a> Parser<'a> {
11671167
// Parse this both to give helpful error messages and to
11681168
// verify it can be done with this parser setup.
11691169
ExprKind::Index(ref left, ref _right, span) => {
1170-
self.sess.emit_err(errors::ArrayIndexInOffsetOf(span));
1170+
self.dcx().emit_err(errors::ArrayIndexInOffsetOf(span));
11711171
current = left;
11721172
}
11731173
ExprKind::Lit(token::Lit {
@@ -1216,14 +1216,14 @@ impl<'a> Parser<'a> {
12161216
fields.insert(start_idx, *ident)
12171217
}
12181218
_ => {
1219-
self.sess.emit_err(errors::InvalidOffsetOf(current.span));
1219+
self.dcx().emit_err(errors::InvalidOffsetOf(current.span));
12201220
break;
12211221
}
12221222
}
12231223
break;
12241224
}
12251225
_ => {
1226-
self.sess.emit_err(errors::InvalidOffsetOf(current.span));
1226+
self.dcx().emit_err(errors::InvalidOffsetOf(current.span));
12271227
break;
12281228
}
12291229
}
@@ -1233,12 +1233,12 @@ impl<'a> Parser<'a> {
12331233
break;
12341234
} else if trailing_dot.is_none() {
12351235
// This loop should only repeat if there is a trailing dot.
1236-
self.sess.emit_err(errors::InvalidOffsetOf(self.token.span));
1236+
self.dcx().emit_err(errors::InvalidOffsetOf(self.token.span));
12371237
break;
12381238
}
12391239
}
12401240
if let Some(dot) = trailing_dot {
1241-
self.sess.emit_err(errors::InvalidOffsetOf(dot));
1241+
self.dcx().emit_err(errors::InvalidOffsetOf(dot));
12421242
}
12431243
Ok(fields.into_iter().collect())
12441244
}

0 commit comments

Comments
 (0)