-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve use of ErrorGuaranteed
#103874
Comments
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
@rustbot claim |
This was referenced Nov 3, 2022
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Nov 4, 2022
Improve use of ErrorGuaranteed and code cleanup Part of rust-lang#103874
Manishearth
added a commit
to Manishearth/rust
that referenced
this issue
Nov 8, 2022
…y_error_with_guaranteed, r=lcnr Add 'ty_error_with_guaranteed' and 'const_error_with_guaranteed' Part of rust-lang#103874
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
Nov 8, 2022
…y_error_with_guaranteed, r=lcnr Add 'ty_error_with_guaranteed' and 'const_error_with_guaranteed' Part of rust-lang#103874
The last sub-item didn't implemented. |
👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: