-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Support return-type bounds on associated methods from supertraits #111161
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
Conversation
r? @cjgillot (rustbot has picked a reviewer for you, use r? to override) |
oops forgot about perf run @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit 76802e3 with merge f8c0fd4d2d0c4d72a56ea18b2231c4cab095f66b... |
☀️ 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 (f8c0fd4d2d0c4d72a56ea18b2231c4cab095f66b): comparison URL. Overall result: no relevant changes - 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 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. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 654.067s -> 653.705s (-0.06%) |
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (0dddad0): 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. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 652.816s -> 653.81s (0.15%) |
Support
T: Trait<method(): Bound>
whenmethod
comes from a supertrait, aligning it with the behavior of associated type bounds (both equality and trait bounds).The only wrinkle is that I have to extend
super_predicates_that_define_assoc_type
to look for all items, not justAssocKind::Ty
. This will also be needed to supportfeature(associated_const_equality)
as well, which is subtly broken when it comes to supertraits, though this PR does not fix those yet. There's a slight chance there's a perf regression here, in which case I guess I could split it out into a separate query.