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

doc: improve/fix 'let' FAQ #24554

Merged
merged 1 commit into from
Apr 19, 2015
Merged

doc: improve/fix 'let' FAQ #24554

merged 1 commit into from
Apr 19, 2015

Conversation

tshepang
Copy link
Member

No description provided.

@rust-highfive
Copy link
Collaborator

r? @huonw

(rust_highfive has picked a reviewer for you, use r? to override)

@steveklabnik
Copy link
Member

@bors: r+ rollup

@steveklabnik steveklabnik assigned steveklabnik and unassigned huonw Apr 18, 2015
@bors
Copy link
Contributor

bors commented Apr 18, 2015

📌 Commit 4665c3b has been approved by steveklabnik

bors added a commit that referenced this pull request Apr 19, 2015
@bors
Copy link
Contributor

bors commented Apr 19, 2015

⌛ Testing commit 4665c3b with merge bd968a1...

@bors bors merged commit 4665c3b into rust-lang:master Apr 19, 2015
`while let` and `match`. Bindings also exist in function arguments positions.
Instead of the term "variable", we use "variable bindings". The
simplest way for creating a binding is by using the `let` syntax.
Other ways include `if let`, `while let`, and `match`. Bindings also
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing is missing here: for-in also do pattern matching.

edit: fix typo

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has now be merged, so you can create a separate PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about "Other ways include if let, while let, match and for ... in. "?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While doing this PR, I was actually thinking maybe it should a bullet list:

Other ways of creating bindings:

  • if let
  • while let
  • ...

BTW, for item in items is a nice catch... I forgot about it.

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.

6 participants