-
Notifications
You must be signed in to change notification settings - Fork 13.8k
TRPL: deref coercions #24722
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
TRPL: deref coercions #24722
Conversation
src/doc/trpl/deref-coercions.md
Outdated
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.
s/convert/coerce/
I think the distinction may matter in some places? I'm not super sure though
Nice! Could this also mention somewhere that |
r=me with those nits otherwise though! |
Can we also mention (or link to) autoderef here somewhere? I'd like all of the deref magic to be mentioned in one place. |
issues fixed, and @Manishearth 's section added 😄 |
src/doc/trpl/deref-coercions.md
Outdated
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.
Did this mean to use &
instead of *
?
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.
Yes. eff.
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.
well, i guess it actually meant to use &
and *
alternating, since that's the behavior, right?
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.
I think this means to say that a value of type &&&&&&&&&&&&&&&&Foo
can still have methods defined on Foo
called as the compiler will insert as many *
operations as necessary (basically).
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.
adding to #24786 |
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.
Which 'two things' is this referring to?
r? @alexcrichton