-
Notifications
You must be signed in to change notification settings - Fork 59
Editorial changes. #120
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
Editorial changes. #120
Conversation
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.
LGTM.
reference/src/layout/pointers.md
Outdated
@@ -40,23 +39,23 @@ word and have therefore the same layout as C pointers. | |||
> or, in the case of `&mut T`, aliasing. | |||
|
|||
We do not make any guarantees about the layout of | |||
multi-trait objects `&(dyn T + U)` or references to other dynamically sized types, | |||
multi-trait objects `&(dyn Tr + Ur)` or references to other dynamically sized types, |
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.
Maybe use Trait0
and Trait1
here ?
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.
Changed to Trait1 and Trait2.
Where is this guaranteed ? (Can you point to an RFC, the reference, etc.?) |
Hmm, i never questioned this! No, i don't think i've seen any material explicitly said so. I think it is important for this to become a guarantee, or i won't be able to transmute a |
We'll discuss it in the next meeting (next thursday), this will give time to more people to take a look at this. |
I think it's fine to merge this as long as it doesn't make new guarantees -- and I don't think it does. :) See my one remaining open comment, though. |
Co-Authored-By: crlf0710 <[email protected]>
Thanks! |
We do not guarantee the layout of trait objects in any shape or form on stable. As for |
I'm not happy with several wordings within the text, so i did some small modifications.
Beyond this, i think
&dyn Trait + <auto trait>s + <lifetime bounds>
are actually guaranteed, but this text didn't cover it somehow. And i don't really know the correct way to write them out. Besides this, i'm still puzzled about things like the validity of&dyn Send + Sync
and&dyn Sync + Send
...