Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Generic Pointer to Field #2708
Generic Pointer to Field #2708
Changes from 19 commits
a458996
7eb7ea4
7ada603
6a9405f
9b98d97
b816798
0eb3d5c
9d82646
a1b545e
8b5e4e2
14fc49f
d3cac45
d001442
d671633
08d9ec2
00de06a
43d559b
7c5161a
a83911c
6da5da2
97e2a7f
9d78b37
f362e75
dece0b1
2e77eef
e0e7e80
da3afb6
21cf26b
6b31b65
00b4d4b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This seems to be out of place now, as the more powerful abstraction isn't provided by this RFC anymore.
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.
True, but I still think that it is worth pointing out. Also, I just moved
Project
to the future possibilities section so people can still so what a project trait could look like, and how it would work with this proposal.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.
So wait, how does this interact with unsized types exactly? This needs to be spelled out.
Since this is specifically to give vocabulary to the direct manipulation of the pointers, I suspect that this should require that the field pointer's metadata is derivable from the parent metadata. Note that this doesn't require equivalent metadata: a theoretical pointer with two metadatas could be split into two child fat pointers with one or the other metadata.
The intrinsics live in
core::intrinsics
, of course.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.
Actually, you can only have 1 unsized field on a type, and it must be the last field, so the metadata will be exactly the same.
Also, I haven't considered how custom DST will interact with this, but that still hasn't been accepted. I will add that as an unanswered question.
Yes, I will make it clear where everything lives in the next revision. I see now that it wasn't clear enough