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

Elaborate manual on matching (dereference patterns, lvalue/rvalue matchi... #10892

Closed
wants to merge 1 commit into from

Conversation

ezyang
Copy link
Contributor

@ezyang ezyang commented Dec 10, 2013

...ng)

Signed-off-by: Edward Z. Yang ezyang@cs.stanford.edu

@huonw
Copy link
Member

huonw commented Dec 10, 2013

cc @nikomatsakis, is this accurate?

@huonw
Copy link
Member

huonw commented Dec 10, 2013

Also, I take it that this is designed as a fix for #10890?

@nikomatsakis
Copy link
Contributor

This is not 100% accurate. In particular, matches on lvalues never allocate a temporary location. Rather, if there are by-value bindings, those values are copied/moved directly from the lvalue itself.

…ching)

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
@ezyang
Copy link
Contributor Author

ezyang commented Dec 11, 2013

Updated to address Niko's comment.

@adrientetar
Copy link
Contributor

@ezyang Doc code snippets are tested in an automated fashion.

You can add stealth declarations beginning with # (space after # is important).
# let x = ...;

@alexcrichton
Copy link
Member

Closing due to inactivity, but feel free to reopen with a rebase!

bors added a commit that referenced this pull request Jan 18, 2014
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.

7 participants