Skip to content
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

Implement RFC 3624 supertrait_item_shadowing (v2) #125782

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented May 30, 2024

Draft for now, just proving the algorithm is just a simple tweak to method probe. Also should probably wait until the RFC is landed.

Few more tests need to be written:

  • Shadowing via type-dependent qpath syntax (T::method)
  • Associated consts (since they use method probing for lookup)
  • Out-of-scope traits aren't shadowing
  • Don't pick a subtrait that doesn't hold

Tracking:

cc @Amanieu and rust-lang/rfcs#3624 and #89151

r? @ghost

@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 30, 2024
@compiler-errors compiler-errors changed the title Implement RFC 3624 supertrait_item_shadowing Implement RFC 3624 supertrait_item_shadowing (v2) May 30, 2024
@traviscross traviscross added the F-supertrait_item_shadowing `#![feature(supertrait_item_shadowing)]` label May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-supertrait_item_shadowing `#![feature(supertrait_item_shadowing)]` 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants