Rename HandlerInner::delay_span_bug
as HandlerInner::span_delayed_bug
.
Because the corresponding `Level` is `DelayedBug` and `span_delayed_bug` follows the pattern used everywhere else: `span_err`, `span_warning`, etc.
This commit is contained in:
parent
57d6f840b9
commit
5d1d384443
131 changed files with 309 additions and 278 deletions
|
@ -114,7 +114,7 @@ fn lit_to_mir_constant<'tcx>(
|
|||
let width = tcx
|
||||
.layout_of(param_ty)
|
||||
.map_err(|_| {
|
||||
LitToConstError::Reported(tcx.sess.delay_span_bug(
|
||||
LitToConstError::Reported(tcx.sess.span_delayed_bug(
|
||||
DUMMY_SP,
|
||||
format!("couldn't compute width of literal: {:?}", lit_input.lit),
|
||||
))
|
||||
|
@ -158,7 +158,7 @@ fn lit_to_mir_constant<'tcx>(
|
|||
}
|
||||
(ast::LitKind::Float(n, _), ty::Float(fty)) => parse_float_into_constval(*n, *fty, neg)
|
||||
.ok_or_else(|| {
|
||||
LitToConstError::Reported(tcx.sess.delay_span_bug(
|
||||
LitToConstError::Reported(tcx.sess.span_delayed_bug(
|
||||
DUMMY_SP,
|
||||
format!("couldn't parse float literal: {:?}", lit_input.lit),
|
||||
))
|
||||
|
@ -167,7 +167,7 @@ fn lit_to_mir_constant<'tcx>(
|
|||
(ast::LitKind::Char(c), ty::Char) => ConstValue::Scalar(Scalar::from_char(*c)),
|
||||
(ast::LitKind::Err, _) => {
|
||||
return Err(LitToConstError::Reported(
|
||||
tcx.sess.delay_span_bug(DUMMY_SP, "encountered LitKind::Err during mir build"),
|
||||
tcx.sess.span_delayed_bug(DUMMY_SP, "encountered LitKind::Err during mir build"),
|
||||
));
|
||||
}
|
||||
_ => return Err(LitToConstError::TypeError),
|
||||
|
|
|
@ -470,7 +470,7 @@ impl<'a, 'tcx> Visitor<'a, 'tcx> for UnsafetyVisitor<'a, 'tcx> {
|
|||
if let Some((assigned_ty, assignment_span)) = self.assignment_info {
|
||||
if assigned_ty.needs_drop(self.tcx, self.param_env) {
|
||||
// This would be unsafe, but should be outright impossible since we reject such unions.
|
||||
self.tcx.sess.delay_span_bug(assignment_span, format!("union fields that need dropping should be impossible: {assigned_ty}"));
|
||||
self.tcx.sess.span_delayed_bug(assignment_span, format!("union fields that need dropping should be impossible: {assigned_ty}"));
|
||||
}
|
||||
} else {
|
||||
self.requires_unsafe(expr.span, AccessToUnionField);
|
||||
|
|
|
@ -16,7 +16,7 @@ pub(crate) fn lit_to_const<'tcx>(
|
|||
let width = tcx
|
||||
.layout_of(param_ty)
|
||||
.map_err(|_| {
|
||||
LitToConstError::Reported(tcx.sess.delay_span_bug(
|
||||
LitToConstError::Reported(tcx.sess.span_delayed_bug(
|
||||
DUMMY_SP,
|
||||
format!("couldn't compute width of literal: {:?}", lit_input.lit),
|
||||
))
|
||||
|
@ -62,7 +62,7 @@ pub(crate) fn lit_to_const<'tcx>(
|
|||
(ast::LitKind::Float(n, _), ty::Float(fty)) => {
|
||||
let bits = parse_float_into_scalar(*n, *fty, neg)
|
||||
.ok_or_else(|| {
|
||||
LitToConstError::Reported(tcx.sess.delay_span_bug(
|
||||
LitToConstError::Reported(tcx.sess.span_delayed_bug(
|
||||
DUMMY_SP,
|
||||
format!("couldn't parse float literal: {:?}", lit_input.lit),
|
||||
))
|
||||
|
@ -73,7 +73,7 @@ pub(crate) fn lit_to_const<'tcx>(
|
|||
(ast::LitKind::Char(c), ty::Char) => ty::ValTree::from_scalar_int((*c).into()),
|
||||
(ast::LitKind::Err, _) => {
|
||||
return Err(LitToConstError::Reported(
|
||||
tcx.sess.delay_span_bug(DUMMY_SP, "encountered LitKind::Err during mir build"),
|
||||
tcx.sess.span_delayed_bug(DUMMY_SP, "encountered LitKind::Err during mir build"),
|
||||
));
|
||||
}
|
||||
_ => return Err(LitToConstError::TypeError),
|
||||
|
|
|
@ -108,7 +108,7 @@ impl<'a, 'tcx> PatCtxt<'a, 'tcx> {
|
|||
let msg = format!(
|
||||
"found bad range pattern endpoint `{expr:?}` outside of error recovery"
|
||||
);
|
||||
return Err(self.tcx.sess.delay_span_bug(expr.span, msg));
|
||||
return Err(self.tcx.sess.span_delayed_bug(expr.span, msg));
|
||||
};
|
||||
Ok((Some(PatRangeBoundary::Finite(value)), ascr, inline_const))
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ impl<'a, 'tcx> PatCtxt<'a, 'tcx> {
|
|||
) -> Result<PatKind<'tcx>, ErrorGuaranteed> {
|
||||
if lo_expr.is_none() && hi_expr.is_none() {
|
||||
let msg = format!("found twice-open range pattern (`..`) outside of error recovery");
|
||||
return Err(self.tcx.sess.delay_span_bug(span, msg));
|
||||
return Err(self.tcx.sess.span_delayed_bug(span, msg));
|
||||
}
|
||||
|
||||
let (lo, lo_ascr, lo_inline) = self.lower_pattern_range_endpoint(lo_expr)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue