Avoid various uses of Option<Span> in favor of using DUMMY_SP in the few cases that used None

This commit is contained in:
Oli Scherer
2024-03-14 09:10:28 +00:00
parent a42873e85b
commit adda9da604
34 changed files with 70 additions and 75 deletions

View File

@@ -68,7 +68,7 @@ pub fn is_const_evaluatable<'tcx>(
tcx.dcx().span_bug(span, "evaluating `ConstKind::Expr` is not currently supported");
}
ty::ConstKind::Unevaluated(uv) => {
let concrete = infcx.const_eval_resolve(param_env, uv, Some(span));
let concrete = infcx.const_eval_resolve(param_env, uv, span);
match concrete {
Err(ErrorHandled::TooGeneric(_)) => {
Err(NotConstEvaluatable::Error(infcx.dcx().span_delayed_bug(
@@ -99,7 +99,7 @@ pub fn is_const_evaluatable<'tcx>(
// and hopefully soon change this to an error.
//
// See #74595 for more details about this.
let concrete = infcx.const_eval_resolve(param_env, uv, Some(span));
let concrete = infcx.const_eval_resolve(param_env, uv, span);
match concrete {
// If we're evaluating a generic foreign constant, under a nightly compiler while
// the current crate does not enable `feature(generic_const_exprs)`, abort