Always compute coroutine layout for eagerly emitting recursive layout errors by compiler-errors · Pull Request #136073 · rust-lang/rust (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation25 Commits1 Checks6 Files changed
Conversation
This file contains hidden or 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
[ Show hidden characters]({{ revealButtonHref }})
Detect recursive coroutine layouts even if we don't detect opaque type recursion in the new solver. This is for two reasons:
- It helps us detect (bad) recursive async function calls in the new solver, which due to its approach to normalization causes us to not detect this via a recursive RPIT (since the opaques are more eagerly revealed in the opaque body).
- It helps us detect (bad) recursive async functions behind AFITs. See the AFIT test that changed for the old solver too.
- It also greatly simplifies the recursive impl trait check, since I can remove some jankness around how it handles coroutines.
rustbot added S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
This comment has been minimized.
bors added a commit to rust-lang-ci/rust that referenced this pull request
…s, r=
Always compute coroutine layout when checking for recursive opaques
r? @ghost
☀️ Try build successful - checks-actions
Build commit: c104bc5 (c104bc51797b06eb29cd2555f79c3ac9f394784c
)
This comment has been minimized.
Finished benchmarking commit (c104bc5): comparison URL.
Overall result: ❌ regressions - please read the text below
Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.
Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged
along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.
@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression
Instruction count
This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
mean | range | count | |
---|---|---|---|
Regressions ❌ (primary) | - | - | 0 |
Regressions ❌ (secondary) | 2.6% | [0.4%, 5.9%] | 12 |
Improvements ✅ (primary) | - | - | 0 |
Improvements ✅ (secondary) | - | - | 0 |
All ❌✅ (primary) | - | - | 0 |
Max RSS (memory usage)
Results (primary 1.3%, secondary 2.4%)
This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
mean | range | count | |
---|---|---|---|
Regressions ❌ (primary) | 1.3% | [0.7%, 2.0%] | 8 |
Regressions ❌ (secondary) | 2.4% | [2.1%, 2.7%] | 2 |
Improvements ✅ (primary) | - | - | 0 |
Improvements ✅ (secondary) | - | - | 0 |
All ❌✅ (primary) | 1.3% | [0.7%, 2.0%] | 8 |
Cycles
Results (secondary 4.1%)
This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
mean | range | count | |
---|---|---|---|
Regressions ❌ (primary) | - | - | 0 |
Regressions ❌ (secondary) | 4.1% | [2.5%, 7.0%] | 6 |
Improvements ✅ (primary) | - | - | 0 |
Improvements ✅ (secondary) | - | - | 0 |
All ❌✅ (primary) | - | - | 0 |
Binary size
This benchmark run did not return any relevant results for this metric.
Bootstrap: 771.158s -> 772.043s (0.11%)
Artifact size: 325.82 MiB -> 325.82 MiB (0.00%)
I still think we should land this even tho it has regressions on some pathological tests.
We need it to detect some recursive coroutines in the new solver.
I'll add more info, add some tests, and take this out of draft.
This comment has been minimized.
bors added a commit to rust-lang-ci/rust that referenced this pull request
…s, r=
Always compute coroutine layout when checking for recursive opaques
r? @ghost
☀️ Try build successful - checks-actions
Build commit: 313ad1f (313ad1f53edbaaf88cd78023244a12e4af14c352
)
This comment has been minimized.
Finished benchmarking commit (313ad1f): comparison URL.
Overall result: ❌ regressions - please read the text below
Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.
Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged
along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.
@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression
Instruction count
This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
mean | range | count | |
---|---|---|---|
Regressions ❌ (primary) | - | - | 0 |
Regressions ❌ (secondary) | 4.7% | [0.5%, 8.0%] | 4 |
Improvements ✅ (primary) | - | - | 0 |
Improvements ✅ (secondary) | - | - | 0 |
All ❌✅ (primary) | - | - | 0 |
Max RSS (memory usage)
Results (secondary 2.2%)
This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
mean | range | count | |
---|---|---|---|
Regressions ❌ (primary) | - | - | 0 |
Regressions ❌ (secondary) | 2.2% | [2.2%, 2.2%] | 1 |
Improvements ✅ (primary) | - | - | 0 |
Improvements ✅ (secondary) | - | - | 0 |
All ❌✅ (primary) | - | - | 0 |
Cycles
Results (secondary 8.4%)
This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
mean | range | count | |
---|---|---|---|
Regressions ❌ (primary) | - | - | 0 |
Regressions ❌ (secondary) | 8.4% | [7.4%, 9.4%] | 2 |
Improvements ✅ (primary) | - | - | 0 |
Improvements ✅ (secondary) | - | - | 0 |
All ❌✅ (primary) | - | - | 0 |
Binary size
This benchmark run did not return any relevant results for this metric.
Bootstrap: 772.206s -> 774.281s (0.27%)
Artifact size: 328.24 MiB -> 328.18 MiB (-0.02%)
This is only a regression for check builds on a pathological test for coroutines. Notably it doesn't affect full builds (at least from what I could tell from the results).
I think that we should otherwise land this; see PR description for why.
compiler-errors changed the title
Always compute coroutine layout when checking for recursive opaques Always compute coroutine layout for eagerly emitting recursive layout errors
📌 Commit d75d180 has been approved by oli-obk
It is now in the queue for this repository.
bors added S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
and removed S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
🔒 Merge conflict
This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.
How do I rebase?
Assuming self
is your fork and upstream
is this repository, you can resolve the conflict following these steps:
git checkout recursive-coro-always
(switch to your branch)git fetch upstream master
(retrieve the latest master)git rebase upstream/master -p
(rebase on top of it)- Follow the on-screen instruction to resolve conflicts (check
git status
if you got lost). git push self recursive-coro-always --force-with-lease
(update this PR)
You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial.
Please avoid the "Resolve conflicts" button on GitHub. It uses git merge
instead of git rebase
which makes the PR commit history more difficult to read.
Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock
conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.
Error message
Auto-merging compiler/rustc_interface/src/passes.rs
Auto-merging compiler/rustc_hir_analysis/src/check/check.rs
CONFLICT (content): Merge conflict in compiler/rustc_hir_analysis/src/check/check.rs
Automatic merge failed; fix conflicts and then commit the result.
📌 Commit eedfece has been approved by oli-obk
It is now in the queue for this repository.
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-author
Status: This is awaiting some action (such as code changes or more information) from the author.
labels
@bors rollup=maybe basically perf neutral and queue is full
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request
…ays, r=oli-obk
Always compute coroutine layout for eagerly emitting recursive layout errors
Detect recursive coroutine layouts even if we don't detect opaque type recursion in the new solver. This is for two reasons:
- It helps us detect (bad) recursive async function calls in the new solver, which due to its approach to normalization causes us to not detect this via a recursive RPIT (since the opaques are more eagerly revealed in the opaque body).
- It helps us detect (bad) recursive async functions behind AFITs. See the AFIT test that changed for the old solver too.
- It also greatly simplifies the recursive impl trait check, since I can remove some jankness around how it handles coroutines.
looks like this needs another rebase
@bors r-
bors added S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
and removed S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
📌 Commit d0b0b02 has been approved by oli-obk
It is now in the queue for this repository.
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-author
Status: This is awaiting some action (such as code changes or more information) from the author.
labels
bors added a commit to rust-lang-ci/rust that referenced this pull request
…iaskrgr
Rollup of 7 pull requests
Successful merges:
- rust-lang#136073 (Always compute coroutine layout for eagerly emitting recursive layout errors)
- rust-lang#136235 (Pretty print pattern type values with transmute if they don't satisfy their pattern)
- rust-lang#136311 (Ensure that we never try to monomorphize the upcasting or vtable calls of impossible dyn types)
- rust-lang#136315 (Use short ty string for binop and unop errors)
- rust-lang#136393 (Fix accidentally not emitting overflowing literals lints anymore in patterns)
- rust-lang#136435 (Simplify some code for lowering THIR patterns)
- rust-lang#136630 (Change two std process tests to not output to std{out,err}, and fix test suite stat reset in bootstrap CI test rendering)
r? @ghost
@rustbot
modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request
Rollup of 7 pull requests
Successful merges:
- rust-lang#136073 (Always compute coroutine layout for eagerly emitting recursive layout errors)
- rust-lang#136235 (Pretty print pattern type values with transmute if they don't satisfy their pattern)
- rust-lang#136311 (Ensure that we never try to monomorphize the upcasting or vtable calls of impossible dyn types)
- rust-lang#136315 (Use short ty string for binop and unop errors)
- rust-lang#136393 (Fix accidentally not emitting overflowing literals lints anymore in patterns)
- rust-lang#136435 (Simplify some code for lowering THIR patterns)
- rust-lang#136630 (Change two std process tests to not output to std{out,err}, and fix test suite stat reset in bootstrap CI test rendering)
r? @ghost
@rustbot
modify labels: rollup
try-job: aarch64-gnu-debug
bors added a commit to rust-lang-ci/rust that referenced this pull request
…iaskrgr
Rollup of 7 pull requests
Successful merges:
- rust-lang#136073 (Always compute coroutine layout for eagerly emitting recursive layout errors)
- rust-lang#136235 (Pretty print pattern type values with transmute if they don't satisfy their pattern)
- rust-lang#136311 (Ensure that we never try to monomorphize the upcasting or vtable calls of impossible dyn types)
- rust-lang#136315 (Use short ty string for binop and unop errors)
- rust-lang#136393 (Fix accidentally not emitting overflowing literals lints anymore in patterns)
- rust-lang#136435 (Simplify some code for lowering THIR patterns)
- rust-lang#136630 (Change two std process tests to not output to std{out,err}, and fix test suite stat reset in bootstrap CI test rendering)
r? @ghost
@rustbot
modify labels: rollup
try-job: aarch64-gnu-debug
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request
Rollup merge of rust-lang#136073 - compiler-errors:recursive-coro-always, r=oli-obk
Always compute coroutine layout for eagerly emitting recursive layout errors
Detect recursive coroutine layouts even if we don't detect opaque type recursion in the new solver. This is for two reasons:
- It helps us detect (bad) recursive async function calls in the new solver, which due to its approach to normalization causes us to not detect this via a recursive RPIT (since the opaques are more eagerly revealed in the opaque body).
- It helps us detect (bad) recursive async functions behind AFITs. See the AFIT test that changed for the old solver too.
- It also greatly simplifies the recursive impl trait check, since I can remove some jankness around how it handles coroutines.
flip1995 pushed a commit to flip1995/rust that referenced this pull request
…iaskrgr
Rollup of 7 pull requests
Successful merges:
- rust-lang#136073 (Always compute coroutine layout for eagerly emitting recursive layout errors)
- rust-lang#136235 (Pretty print pattern type values with transmute if they don't satisfy their pattern)
- rust-lang#136311 (Ensure that we never try to monomorphize the upcasting or vtable calls of impossible dyn types)
- rust-lang#136315 (Use short ty string for binop and unop errors)
- rust-lang#136393 (Fix accidentally not emitting overflowing literals lints anymore in patterns)
- rust-lang#136435 (Simplify some code for lowering THIR patterns)
- rust-lang#136630 (Change two std process tests to not output to std{out,err}, and fix test suite stat reset in bootstrap CI test rendering)
r? @ghost
@rustbot
modify labels: rollup
try-job: aarch64-gnu-debug
Labels
Performance regression.
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Relevant to the compiler team, which will review and decide on the PR/issue.