You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
add a way to create a ty_error and const_error by using an existing ErrorGuaranteed instead of using another delay_span_bug.
change uses of references_error which use delay_span_bug right after to instead use TypeVisitable::error_reported() and not emit a span_bug.
in TypeVisitable::error_reported(), instead of using ErrorGuaranteed::unchecked_claim_error_was_emitted(), use the tls tcx to check that tcx.sess.has_errors() is true (maybe in a #[cold] nested function for perf).
change error_reported to use Result<(), ErrorGuaranteed> instead of an option
consider merging error_reported and references_error so that there's only 1 function, using .is_ok() in the current uses of references_error. Not sure about this point, might not make stuff clearer and I can't think of a good name.
The text was updated successfully, but these errors were encountered:
lcnr
added
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
E-mentor
Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
E-medium
Call for participation: Medium difficulty. Experience needed to fix: Intermediate.
labels
Nov 2, 2022
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
there are multiple small things to improve
ErrorGuaranteed
:ErrorGuaranteed
directly.ty_error
andconst_error
by using an existingErrorGuaranteed
instead of using anotherdelay_span_bug
.references_error
which usedelay_span_bug
right after to instead useTypeVisitable::error_reported()
and not emit a span_bug.TypeVisitable::error_reported()
, instead of usingErrorGuaranteed::unchecked_claim_error_was_emitted()
, use the tlstcx
to check thattcx.sess.has_errors()
is true (maybe in a#[cold]
nested function for perf).error_reported
to useResult<(), ErrorGuaranteed>
instead of an optionerror_reported
andreferences_error
so that there's only 1 function, using.is_ok()
in the current uses ofreferences_error
. Not sure about this point, might not make stuff clearer and I can't think of a good name.The text was updated successfully, but these errors were encountered: