Skip to content

Conversation

Stebalien
Copy link
Contributor

Needed to support:

match X {
  pattern if Y ...
}

for pattern in Y {}

IMO, this shouldn't require an RFC because it can't interfere with any future language changes (because pattern if and pattern in are already legal in rust) and can't cause any ambiguity.

Needed to support:

match X {
  pattern if Y ...
}

for pattern in Y {}
@rust-highfive
Copy link
Contributor

r? @huonw

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

@Stebalien Stebalien changed the title Allow patterns to be followed by if and in. Allow patterns in macros to be followed by if and in. May 22, 2015
@huonw
Copy link
Contributor

huonw commented May 24, 2015

Thoughts? @cmr, @nikomatsakis

@emberian
Copy link
Contributor

Seems reasonable, we can't break this.

@alexcrichton
Copy link
Member

@bors: r+ f21655e

I agree with @cmr!

bors added a commit that referenced this pull request May 27, 2015
Needed to support:

```rust
match X {
  pattern if Y ...
}

for pattern in Y {}
```

IMO, this shouldn't require an RFC because it can't interfere with any future language changes (because `pattern if` and `pattern in` are already legal in rust) and can't cause any ambiguity.
@bors
Copy link
Collaborator

bors commented May 27, 2015

⌛ Testing commit f21655e with merge e4c64a1...

@bors bors merged commit f21655e into rust-lang:master May 27, 2015
@Stebalien Stebalien deleted the pattern branch June 11, 2015 16:09
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