-
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
Do check_coroutine_obligations
once per typeck root
#123993
Merged
Merged
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
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
Apr 15, 2024
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
This comment has been minimized.
This comment has been minimized.
compiler-errors
commented
Apr 16, 2024
@@ -759,7 +759,9 @@ fn run_required_analyses(tcx: TyCtxt<'_>) { | |||
tcx.hir().par_body_owners(|def_id| { | |||
if tcx.is_coroutine(def_id.to_def_id()) { | |||
tcx.ensure().mir_coroutine_witnesses(def_id); | |||
tcx.ensure().check_coroutine_obligations(def_id); | |||
tcx.ensure().check_coroutine_obligations( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only thing I'm kinda unsatisfied with is calling check_coroutine_obligations
once per coroutine rather than once per typeck root. Not sure if there's a better place to relocate this check, tho.
@bors r+ rollup |
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
Apr 23, 2024
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 23, 2024
Rollup of 7 pull requests Successful merges: - rust-lang#120929 (Wrap dyn type with parentheses in suggestion) - rust-lang#122591 (Suggest using type args directly instead of equality constraint) - rust-lang#122598 (deref patterns: lower deref patterns to MIR) - rust-lang#123048 (alloc::Layout: explicitly document size invariant on the type level) - rust-lang#123993 (Do `check_coroutine_obligations` once per typeck root) - rust-lang#124218 (Allow nesting subdiagnostics in #[derive(Subdiagnostic)]) - rust-lang#124285 (Mark ``@RUSTC_BUILTIN`` search path usage as unstable) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 23, 2024
Rollup merge of rust-lang#123993 - compiler-errors:coroutine-obl, r=lcnr Do `check_coroutine_obligations` once per typeck root We only need to do `check_coroutine_obligations` once per typeck root, especially since the new solver can't really (easily) associate which obligations correspond to which coroutines. This requires us to move the checks for sized coroutine fields into `mir_coroutine_witnesses`, but that's fine imo. r? lcnr
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.
We only need to do
check_coroutine_obligations
once per typeck root, especially since the new solver can't really (easily) associate which obligations correspond to which coroutines.This requires us to move the checks for sized coroutine fields into
mir_coroutine_witnesses
, but that's fine imo.r? lcnr