-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
rustc: allow non-empty ParamEnv's in global trait select/eval caches. #66821
Conversation
@bors try @rust-timer queue |
Awaiting bors try build completion |
⌛ Trying commit d637c85 with merge 06db465248f3aa76f16924e778609dec610063a4... |
This comment has been minimized.
This comment has been minimized.
☀️ Try build successful - checks-azure |
Queued 06db465248f3aa76f16924e778609dec610063a4 with parent 04e69e4, future comparison URL. |
Finished benchmarking try commit 06db465248f3aa76f16924e778609dec610063a4, comparison URL. |
Looks like the wins aren't as significant as #66020 (comment), but they are comparable. |
[WIP] [DO NOT MERGE] combine #66020 and #66821. That is, the two fixes for #65510, and only for perf testing purposes. The fact that they both work to a comparable extent, while touching different parts of the trait system, made me curious if there would be any gains from having both. r? @nikomatsakis
Oh, also, the Then again, looking at #66020's own |
8f1af1d
to
36b23ed
Compare
36b23ed
to
a266ea0
Compare
Take 2 (after getting tests to pass): |
Awaiting bors try build completion |
rustc: allow non-empty ParamEnv's in global trait select/eval caches. *Based on #66963* This appears to alleviate the symptoms of #65510 locally (without fixing WF directly), and is potentially easier to validate as sound (since it's a more ad-hoc version of queries we already have). I'm opening this PR primarily to test the effects on perf. r? @nikomatsakis cc @rust-lang/wg-traits
☀️ Try build successful - checks-azure |
Queued 1ff0441 with parent 2da942f, future comparison URL. |
Finished benchmarking try commit 1ff0441, comparison URL. |
Looks comparable, so the changes I had to make didn't cause much of a difference. |
Blocked on #66963 |
📌 Commit a266ea0 has been approved by |
@bors rollup=never |
rustc: allow non-empty ParamEnv's in global trait select/eval caches. *Based on #66963* This appears to alleviate the symptoms of #65510 locally (without fixing WF directly), and is potentially easier to validate as sound (since it's a more ad-hoc version of queries we already have). I'm opening this PR primarily to test the effects on perf. r? @nikomatsakis cc @rust-lang/wg-traits
LL | fn foo_desugared<T: TraitWithAssoc>(_: T) -> Foo<T::Assoc> { | ||
| -- help: consider further restricting this bound: `T: TraitWithAssoc +` |
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.
This error looks pretty wrong though, doesn't it?
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.
Yeah, but it makes sense in the context.
It's the error you get if the other errors don't prevent the impl Trait
from getting the incompatible concrete type, because of the type parameter that is now in the wrong ParamEnv
, which doesn't have the original bound.
This is pre-existing, it was just hidden by the bug #66963 fixes.
☀️ Test successful - checks-azure |
Based on #66963
This appears to alleviate the symptoms of #65510 locally (without fixing WF directly), and is potentially easier to validate as sound (since it's a more ad-hoc version of queries we already have).
I'm opening this PR primarily to test the effects on perf.
r? @nikomatsakis cc @rust-lang/wg-traits