Skip to content

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

Merged
merged 3 commits into from
May 7, 2023

Conversation

compiler-errors
Copy link
Member

Support T: Trait<method(): Bound> when method 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 just AssocKind::Ty. This will also be needed to support feature(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.

@rustbot
Copy link
Collaborator

rustbot commented May 3, 2023

r? @cjgillot

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 3, 2023
@compiler-errors compiler-errors changed the title Support RTN on associated methods from supertraits Support return-type bounds on associated methods from supertraits May 3, 2023
@compiler-errors
Copy link
Member Author

oops forgot about perf run

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 3, 2023
@bors
Copy link
Collaborator

bors commented May 3, 2023

⌛ Trying commit 76802e3 with merge f8c0fd4d2d0c4d72a56ea18b2231c4cab095f66b...

@bors
Copy link
Collaborator

bors commented May 4, 2023

☀️ Try build successful - checks-actions
Build commit: f8c0fd4d2d0c4d72a56ea18b2231c4cab095f66b (f8c0fd4d2d0c4d72a56ea18b2231c4cab095f66b)

1 similar comment
@bors
Copy link
Collaborator

bors commented May 4, 2023

☀️ Try build successful - checks-actions
Build commit: f8c0fd4d2d0c4d72a56ea18b2231c4cab095f66b (f8c0fd4d2d0c4d72a56ea18b2231c4cab095f66b)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (f8c0fd4d2d0c4d72a56ea18b2231c4cab095f66b): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking 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
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This 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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.8% [0.8%, 0.8%] 2
Improvements ✅
(primary)
-3.0% [-3.0%, -3.0%] 1
Improvements ✅
(secondary)
-3.4% [-3.4%, -3.4%] 1
All ❌✅ (primary) -3.0% [-3.0%, -3.0%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 654.067s -> 653.705s (-0.06%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 4, 2023
@cjgillot
Copy link
Contributor

cjgillot commented May 7, 2023

@bors r+

@bors
Copy link
Collaborator

bors commented May 7, 2023

📌 Commit 76802e3 has been approved by cjgillot

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 7, 2023
@bors
Copy link
Collaborator

bors commented May 7, 2023

⌛ Testing commit 76802e3 with merge 0dddad0...

@bors
Copy link
Collaborator

bors commented May 7, 2023

☀️ Test successful - checks-actions
Approved by: cjgillot
Pushing 0dddad0 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 7, 2023
@bors bors merged commit 0dddad0 into rust-lang:master May 7, 2023
@rustbot rustbot added this to the 1.71.0 milestone May 7, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (0dddad0): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This 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.

mean range count
Regressions ❌
(primary)
1.2% [0.1%, 2.3%] 2
Regressions ❌
(secondary)
2.2% [2.2%, 2.3%] 2
Improvements ✅
(primary)
-4.5% [-5.0%, -4.2%] 3
Improvements ✅
(secondary)
-2.8% [-2.8%, -2.8%] 1
All ❌✅ (primary) -2.2% [-5.0%, 2.3%] 5

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 652.816s -> 653.81s (0.15%)

@compiler-errors compiler-errors deleted the rtn-super branch August 11, 2023 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants