-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Various refactorings of the TAIT infrastructure #87587
Conversation
| | ||
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information | ||
= help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable | ||
|
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.
Is it ok to remove this error report? will we need to add it back again with the new scheme? do we need to track this somewhere?.
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 is something that will be allowed under the new scheme
With the planned lazy TAIT system, this will not really make sense anymore anyway.
Previously each opaque type instantiation would create new inference vars, even for the same opaque type/substs combination. Now there is a global map in InferCtxt that gets filled whenever we encounter an opaque type.
This allows opaque type inference to check for defining uses without having to pass down that def id via function arguments to every method that could possibly cause an opaque type to be compared with a concrete type
@bors r+ rollup=always |
📌 Commit 7af445d has been approved by |
@bors r- forgot to do a perf run first |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 7af445d with merge 2b20ba7aedf3287b7b8171fcfda96eec1f5d0427... |
☀️ Try build successful - checks-actions |
💥 Test timed out |
@bors r=spastorino rollup=never |
📌 Commit 93c4aa8 has been approved by |
⌛ Testing commit 93c4aa8 with merge ac109101591bef66e317fada816b2d8b548385e3... |
💔 Test failed - checks-actions |
@bors retry macos runner exited without logs after 1h 47m 35s. |
☀️ Test successful - checks-actions |
The perf regression here is expected and I am keeping an eye on it. I have ideas how to resolve it once my tait refactoring is done |
@oli-obk would it be worth it to track the perf regression in an issue? Then we can mark this as being addressed by adding the |
We could add it as a bullet point to the steps of #63063 |
I'm going to actually go ahead and mark this regression as triaged. I did some investigation into where the increased instruction counts are coming from, and it looks like it's pretty much entirely down to more obligation processing. Even if we believe there's a possible workaround (e.g., the resolution @oli-obk suggests), I don't think it's useful to keep this regression marked as untriaged in the interim. The regression fixes here are likely to come about as more general work -- this PR did not introduce some "particularly slow" code or anything like that. @rustbot label +perf-regression-triaged |
Before this PR we used to store the opaque type knowledge outside the
InferCtxt
, so it got recomputed on every opaque type instantiation.I also removed a feature gate check that makes no sense in the planned lazy TAIT resolution scheme
Each commit passes all tests, so this PR is best reviewed commit by commit.
r? @spastorino