]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #33336 - birkenfeld:issue-27361, r=sfackler
authorSteve Klabnik <steve@steveklabnik.com>
Sat, 7 May 2016 19:35:17 +0000 (15:35 -0400)
committerSteve Klabnik <steve@steveklabnik.com>
Sat, 7 May 2016 19:35:17 +0000 (15:35 -0400)
parser: do not try to continue with `unsafe` on foreign fns

The changed line makes it look like `unsafe` is allowed, but the first statement of `parse_item_foreign_fn` is:

```
self.expect_keyword(keywords::Fn)?;
```

So we get the strange "expected one of `fn`, `pub`, `static`, or `unsafe`, found `unsafe`".

Fixes: #27361
1  2 
src/libsyntax/parse/parser.rs

Simple merge