Remove redundant Code from FulfillmentErrorCode variants

This commit is contained in:
Michael Goulet 2024-01-12 16:16:17 +00:00
parent 174e73a3f6
commit f37a919e96
11 changed files with 59 additions and 60 deletions

View file

@ -63,7 +63,7 @@ pub fn codegen_select_candidate<'tcx>(
// Cycle errors are the only post-monomorphization errors possible; emit them now so
// `rustc_ty_utils::resolve_associated_item` doesn't return `None` post-monomorphization.
for err in errors {
if let FulfillmentErrorCode::CodeCycle(cycle) = err.code {
if let FulfillmentErrorCode::Cycle(cycle) = err.code {
infcx.err_ctxt().report_overflow_obligation_cycle(&cycle);
}
}

View file

@ -54,7 +54,7 @@ fn normalize_projection_ty<'tcx>(
// that impl vars are constrained by the signature, for example).
if !tcx.sess.opts.actually_rustdoc {
for error in &errors {
if let FulfillmentErrorCode::CodeCycle(cycle) = &error.code {
if let FulfillmentErrorCode::Cycle(cycle) = &error.code {
ocx.infcx.err_ctxt().report_overflow_obligation_cycle(cycle);
}
}