-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Consider return type when giving various method suggestions #106607
Consider return type when giving various method suggestions #106607
Conversation
r? @oli-obk (rustbot has picked a reviewer for you, use r? to override) |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit 1bac9237061cb0a72a3b28afb1a719f548c0bc96 with merge 1d2a326a511b803db2092b2da40e17f0608e3975... |
☀️ Try build successful - checks-actions |
1 similar comment
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (1d2a326a511b803db2092b2da40e17f0608e3975): comparison URL. Overall result: ❌ regressions - ACTION NEEDEDBenchmarking 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 @bors rollup=never 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.
|
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.
I'm really surprised by the perf results (although they are quite localized).
Tempted to believe that it's 1f92d5cca52572b08556620ba339365f485166bb causing the problem. Gonna try an experiment... |
Interestingly, due to 1f92d5c, this code also now compiles successfully: use std::ops::Deref;
trait Foo {
fn foo(&self) -> &Self::Target where Self: Deref { &**self }
}
trait Bar {
fn foo(&self) {}
}
fn test(i: impl Foo + Bar) {
i.foo();
} ... becuase we now unconditionally normalize the |
This should revert that behavior, which is a bit disappointing IMO, but should help with the perf regression..? @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit d85ba523ed961ce6da31dd1885a9766dc92ee8d2 with merge 9c64170fab1f1e34ba27072f0151d06e2bfe0131... |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
1 similar comment
This comment was marked as off-topic.
This comment was marked as off-topic.
☔ The latest upstream changes (presumably #106616) made this pull request unmergeable. Please resolve the merge conflicts. |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (9c64170fab1f1e34ba27072f0151d06e2bfe0131): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking 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 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.
CyclesThis benchmark run did not return any relevant results for this metric. |
r=me after a rebase. I recently dug around in this code and am very happy about the new |
d85ba52
to
4f15034
Compare
@bors r=oli-obk |
☀️ Test successful - checks-actions |
1 similar comment
☀️ Test successful - checks-actions |
Finished benchmarking commit (0442fba): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. 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.
CyclesThis benchmark run did not return any relevant results for this metric. |
xform_ret_ty
for non-impl
method candidates. This shouldn't affect happy-path code, since we only usexform_ret_ty
when probing methods for diagnostics (I think).lookup_probe
/probe_for_name
usages in diagnostics. Added a few UI tests to gate against bad suggestions.FnCtxt::lookup_probe_for_diagnostic
which properly passes downIsSuggestion(true)
. Should help suppress other weird notes in some corner cases.