-
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
Remove TypeckResults
from InferCtxt
#101632
Conversation
r? @oli-obk (rust-highfive has picked a reviewer for you, use r? to override) |
☔ The latest upstream changes (presumably #98559) made this pull request unmergeable. Please resolve the merge conflicts. |
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.
really happy about this PR as it is something i've wanted to do myself for quite a while ❤️
some nits and further suggestions, but this looks pretty good already
r? @lcnr |
4c43c71
to
ce7f171
Compare
I don't know where to start with the failing rustdoc tests 😤 |
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #102061) made this pull request unmergeable. Please resolve the merge conflicts. |
🤔 i also can't tell why rustdoc is failing 😅 maybe look at the actually generated docs for the smallest failing test to check whether there are any user-visible changes? 🤔 |
ce7f171
to
6da620c
Compare
|
@rustbot ready |
This comment has been minimized.
This comment has been minimized.
6da620c
to
d68bfb9
Compare
@@ -63,6 +66,37 @@ pub struct ImplCandidate<'tcx> { | |||
} | |||
|
|||
pub trait InferCtxtExt<'tcx> { |
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.
should these be on TypeErrCtxt
instead?
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.
Maybe? I was being conservative, only moving stuff to TypeErrCtxt
if it needs TypeckResults
.
compiler/rustc_trait_selection/src/traits/error_reporting/on_unimplemented.rs
Show resolved
Hide resolved
small nits which we can fix in a followup pr prone to merge conflicts: |
📌 Commit d68bfb9012f16c29c52dea118439dc1c8d4354a5 has been approved by It is now in the queue for this repository. |
☀️ Test successful - checks-actions |
Finished benchmarking commit (43c22af): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis 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.
CyclesResultsThis 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.
Footnotes |
oh wow, should have definitely run perf before approving this 😅 i guess this resulted in a lot of small inlining/optimization changes, might be worth to check out the flamegraph comparison of a few regressions to check if we can maybe fix them by putting |
@lcnr @camsteffen I ran callgrind diff on one of the benchmarks. Looks
|
Thanks @rylev. I think it might be |
@camsteffen the symbol is a bit hard to parse. It seems like it's not the function but possibly a closure inside of that function? Might require some experimentation. |
Probably this closure, and if |
|
|
Thanks @nnethercote. I'll gladly ignore that. |
… r=cjgillot Make `overlapping_impls` not generic Trying to win back perf from rust-lang#101632.
InferCtxt
currently hasin_progress_typeck_results
which is only used for some diagnostics during typeck. It adds a lifetime which propagates through a lot of code. This PR moves that field into a new helper structTypeErrCtxt
.