Rollup merge of #32945 - durka:rfc1494, r=pnkfelix

implement RFC amendment 1494

Adds `:block` to the follow set for `:ty` and `:path`. See rust-lang/rfcs#1494.
This commit is contained in:
Manish Goregaokar 2016-04-16 01:16:44 +05:30
commit 90c8d81ee4
No known key found for this signature in database
GPG key ID: 3BBF4D3E2EF79F98
3 changed files with 7 additions and 4 deletions

View file

@ -1014,6 +1014,7 @@ fn is_in_follow(_: &ExtCtxt, tok: &Token, frag: &str) -> Result<bool, String> {
match *tok {
OpenDelim(token::DelimToken::Brace) | OpenDelim(token::DelimToken::Bracket) |
Comma | FatArrow | Colon | Eq | Gt | Semi | BinOp(token::Or) => Ok(true),
MatchNt(_, ref frag, _, _) if frag.name.as_str() == "block" => Ok(true),
Ident(i, _) if (i.name.as_str() == "as" ||
i.name.as_str() == "where") => Ok(true),
_ => Ok(false)