Skip to content

Conversation

@steveklabnik
Copy link
Contributor

Fixes #28687

@rust-highfive
Copy link
Contributor

r? @nikomatsakis

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if it's worth having a section on shadowing? It is interesting to point out that Rust typically allows shadowing, and patterns are just a special case.

It's ALSO interesting (perhaps) to point out that you cannot shadow a constant or enum variant name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We talk about it in the variable bindings section, but this is a question that people ask about with patterns specifically, so I felt it was worth re-calling it out.

@nikomatsakis
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Oct 8, 2015

📌 Commit bbc2056 has been approved by nikomatsakis

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Oct 8, 2015
steveklabnik added a commit to steveklabnik/rust that referenced this pull request Oct 8, 2015
bors added a commit that referenced this pull request Oct 8, 2015
@bors bors merged commit bbc2056 into rust-lang:master Oct 8, 2015
@steveklabnik steveklabnik deleted the gh28687 branch June 19, 2016 20:32
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.

4 participants