-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Remove BorrowckErrors::tainted_by_errors
#120573
Merged
bors
merged 5 commits into
rust-lang:master
from
nnethercote:rm-BorrowckErrors-tainted_by_errors
Feb 4, 2024
Merged
Remove BorrowckErrors::tainted_by_errors
#120573
bors
merged 5 commits into
rust-lang:master
from
nnethercote:rm-BorrowckErrors-tainted_by_errors
Feb 4, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To match `buffer_error`.
It has no effect. Note that `infcx.set_tainted_by_errors()` is still called, so taintedness is still being propagated.
rustbot
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Feb 2, 2024
I hope this doesn't overlap with any of the |
`BorrowckErrors` stores a mix of error and non-error diags in `buffered`. As a result, it downgrades `DiagnosticBuilder`s to `Diagnostic`s, losing the emission guarantees, and so has to use a `tainted_by_errors` field to record whether an error has occurred. This commit splits `buffered` into `buffered_errors` and `buffered_non_errors`, keeping them as `DiagnosticBuilder`s and preserving the emission guarantees. This also requires fixing a bunch of incorrect lifetimes on `DiagnosticBuilder` use points.
It now has a single call site.
And some related things. Because it can hold non-error diagnostics.
nnethercote
force-pushed
the
rm-BorrowckErrors-tainted_by_errors
branch
from
February 2, 2024 03:36
d599958
to
b6a4f03
Compare
🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened. |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Feb 2, 2024
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 4, 2024
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#119543 (add avx512fp16 to x86 target features) - rust-lang#120004 (Release notes for 1.76) - rust-lang#120562 (Revert unsound libcore changes) - rust-lang#120566 (coverage: Use normal `edition:` headers in coverage tests) - rust-lang#120570 (Suggest changing type to const parameters if we encounter a type in the trait bound position) - rust-lang#120571 (Miscellaneous diagnostics cleanups) - rust-lang#120573 (Remove `BorrowckErrors::tainted_by_errors`) - rust-lang#120592 (Remove unnecessary `.to_string()`/`.as_str()`s) - rust-lang#120610 (hir: Remove the generic type parameter from `MaybeOwned`) - rust-lang#120616 (Fix ICE on field access on a tainted type after const-eval failure) Failed merges: - rust-lang#120569 (coverage: Improve handling of function/closure spans) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 4, 2024
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#119543 (add avx512fp16 to x86 target features) - rust-lang#120004 (Release notes for 1.76) - rust-lang#120562 (Revert unsound libcore changes) - rust-lang#120566 (coverage: Use normal `edition:` headers in coverage tests) - rust-lang#120570 (Suggest changing type to const parameters if we encounter a type in the trait bound position) - rust-lang#120571 (Miscellaneous diagnostics cleanups) - rust-lang#120573 (Remove `BorrowckErrors::tainted_by_errors`) - rust-lang#120592 (Remove unnecessary `.to_string()`/`.as_str()`s) - rust-lang#120610 (hir: Remove the generic type parameter from `MaybeOwned`) - rust-lang#120616 (Fix ICE on field access on a tainted type after const-eval failure) Failed merges: - rust-lang#120569 (coverage: Improve handling of function/closure spans) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 4, 2024
Rollup merge of rust-lang#120573 - nnethercote:rm-BorrowckErrors-tainted_by_errors, r=oli-obk Remove `BorrowckErrors::tainted_by_errors` This PR removes one of the `tainted_by_errors` occurrences, replacing it with direct use of `ErrorGuaranteed`. r? `@oli-obk`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR removes one of the
tainted_by_errors
occurrences, replacing it with direct use ofErrorGuaranteed
.r? @oli-obk