-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Closed
Labels
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.Call 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.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
Description
there are multiple small things to improve ErrorGuaranteed:
- remove https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.DelaySpanBugEmitted.html and always use
ErrorGuaranteeddirectly. - add a way to create a
ty_errorandconst_errorby using an existingErrorGuaranteedinstead of using anotherdelay_span_bug. - change uses of
references_errorwhich usedelay_span_bugright after to instead useTypeVisitable::error_reported()and not emit a span_bug. - in
TypeVisitable::error_reported(), instead of usingErrorGuaranteed::unchecked_claim_error_was_emitted(), use the tlstcxto check thattcx.sess.has_errors()is true (maybe in a#[cold]nested function for perf). - change
error_reportedto useResult<(), ErrorGuaranteed>instead of an option - consider merging
error_reportedandreferences_errorso 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.
Metadata
Metadata
Assignees
Labels
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.Call 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.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.