Commit 04097c6
committed
Rollup merge of rust-lang#33336 - birkenfeld:issue-27361, r=sfackler
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: rust-lang#27361File tree
3 files changed
+3
-3
lines changed- src
- libsyntax/parse
- test/parse-fail
3 files changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6020 | 6020 | | |
6021 | 6021 | | |
6022 | 6022 | | |
6023 | | - | |
| 6023 | + | |
6024 | 6024 | | |
6025 | 6025 | | |
6026 | 6026 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
0 commit comments