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

Document how self: Self receiver types *actually* interact with object safety #1455

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

Conversation

steffahn
Copy link
Member

@steffahn steffahn commented Jan 26, 2024

Fixes #1247

The description here on how this works is based purely on experiments on what the compiler does or does not accept (without unstable features), not on any inspection of the implementation in rustc. The term of “implicitly non-dispatchable functions” is one I just made up, as far as I’m aware, because it makes sense in this context. The motivation of future-compatibility is just my guess, too.

I might want to read up some actual sources around relevant RFCs and/or PRs, for precise (intended) behavior, terminology, and motivation of the behavior of self: Self but not Self: Sized methods in traits.

For review, especially if any of my “guesses” here are wrong, I’d thus also appreciate relevant links to relevant discussions to learn from.

@steffahn
Copy link
Member Author

cc @QuineDot since you recently opened #1445, so you might have some ideas or feedback here

@steffahn steffahn changed the title Document how Self receiver types *actually* interact with object safety Document how self: Self receiver types *actually* interact with object safety Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rule around non-dispatchable functions doesn't match the compiler behavior
1 participant