Skip to content

[experimental] Make witnesses more eager #141762

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

compiler-errors
Copy link
Member

r? lcnr

@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels May 30, 2025
@compiler-errors
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 30, 2025
bors added a commit that referenced this pull request May 30, 2025
[experimental] Make witnesses more eager

r? lcnr
@bors
Copy link
Collaborator

bors commented May 30, 2025

⌛ Trying commit 7bff9fb with merge aa7f5f1...

@@ -1508,7 +1508,8 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
defining_opaque_types_and_generators: defining_opaque_types,
}
| TypingMode::Borrowck { defining_opaque_types } => {
defining_opaque_types.is_empty() || !pred.has_opaque_types()
defining_opaque_types.is_empty()
|| (!pred.has_opaque_types() && !pred.has_coroutines())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i feel like we prolly want to instead never erase the coroutines, only the defining opaques when creating a TypingEnv from the current infcx

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be expensive to erase on every call to TypingEnv; otherwise i'll keep this and write a comment explaining why it's unsound.

@bors
Copy link
Collaborator

bors commented May 30, 2025

☀️ Try build successful - checks-actions
Build commit: aa7f5f1 (aa7f5f1743a191388f6b130b1ea65bcfa321c198)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (aa7f5f1): comparison URL.

Overall result: ✅ improvements - no action needed

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.

@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)
- - 0
Improvements ✅
(primary)
-0.2% [-0.2%, -0.2%] 2
Improvements ✅
(secondary)
-0.4% [-0.6%, -0.2%] 5
All ❌✅ (primary) -0.2% [-0.2%, -0.2%] 2

Max RSS (memory usage)

Results (primary -0.4%, secondary -1.3%)

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.6% [1.6%, 1.6%] 1
Regressions ❌
(secondary)
0.5% [0.4%, 0.5%] 3
Improvements ✅
(primary)
-1.4% [-1.6%, -1.3%] 2
Improvements ✅
(secondary)
-1.6% [-3.9%, -0.6%] 17
All ❌✅ (primary) -0.4% [-1.6%, 1.6%] 3

Cycles

Results (secondary -0.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)
1.0% [0.4%, 2.4%] 9
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.4% [-3.7%, -0.5%] 8
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: missing data
Artifact size: 370.26 MiB -> 370.23 MiB (-0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants